Giter VIP home page Giter VIP logo

Comments (2)

anefzaoui avatar anefzaoui commented on August 28, 2024

Although I'm seeing some snippets that are a bit confusing to me if someone could explain :)
screen shot 2017-12-15 at 1 32 58 pm
In this example both left and right text aligns are called.

According to bootstrap

.text-left {
  text-align: left !important;
}
@media (min-width: 768px) {
...
  .text-md-right {
    text-align: right !important;
  }
...
}

So in screens larger than 768 pixels wide they overlap and given both are being attributed as important it puts lessens the performance while the engine tries to render both and assign priorities.

I'm sorry I'm sure I see how this lines up? :) Thanks!

from design-blocks.

dianaprajescu avatar dianaprajescu commented on August 28, 2024

Although using start and end for the text-align CSS property seems like a good idea for RTL, the browser support for these keyword values is not so good. We believe it is more important to have a product that works the same cross-browser than to have a product that works only in some browsers.

Bootstrap classes used for alignment don't have multiple names for the same purpose. They do indeed set the same CSS property, but for different breakpoints. When designing a responsive website, having it look good on mobile is at least as important as how it looks on desktop. What looks okay when aligned to the right on a desktop device may not look okay on mobile. For this reason the classes text-left text-md-right are being used.

It's true that between some breakpoints the rules overlap, which is not ideal, especially for performance, but this is why Bootstrap and the Froala Design Blocks are built mobile first. Since mobile devices are smaller and have lower performance than a desktop, the overlap will happen on the device which is more likely to have more resources.

Froala Design Blocks is currently using Bootstrap and it is best to keep it the way it is, without ditching and replacing basic rules from the project.

from design-blocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.