Frequently Asked Questions

What does Brevis mean?

Brevis means short in Latin.

What is the idea behind Brevis?

Brevis was built on top of four pillars:

To get your head around it, think of classes that do only one thing. With Brevis, classes no longer represent objects - like buttons -, but single a function. Those classes once defined, cannot be changed. It's like Lego© blocks. Combine a bunch of those classes together and you can create just about any UI you want.

How do you call this CSS approach?

There's no standard definition for this approach. You may find terms like functional, atomic, utility-first, low-level, toolkit, immutable and so on. Just pick one. It really doesn't matter, as long as you understand the concept.

How different is Brevis from others utility-first toolkits?

While Brevis and others utility-first toolkits share the same philosophy, under the hood we can be quite different. Brevis has a quite logical and easier naming convention, based on abbreviations and two simple rules. A consistent numerical scale and an improved specificity control, without a single !important rule. We also focus on being as neutral as possible, like our minimal colour palette. There are also differences in the way we handle responsiveness.

Why should I use Brevis?

Let's enumerate a few things that set us apart:

  1. Brevis DOES NOT use a single !important rule.

    Per se, !important is not evil, it's just a bad practice that breaks the natural cascading of the style sheet. That's why a !important declaration should be treated as the last resort. Unfortunately, most frameworks like to use it a lot:

    CSS VERSION !IMPORTANT RULE
    Brevis 0.7.2 0
    Bulma 0.8.0 286
    Bootstrap 4.4.1 1031
    Tailwind 1.2.0 1813

    The use of !important is not prohibited. Yet, the abundant use of it may be a sign of a flaw HTML/CSS structure. What Brevis does, is to have ZERO !important rule by default. That way, the developer has full control of where and when to use !important or not.

  2. Selector-first design. Each class selector is responsive, allowing you to have a very granular control.
  3. There's no pre-defined style. Brevis believes that the design should come from you, and not from the framework.

  4. Because of its utility-first approach, Brevis is DRY by default.

  5. Brevis is a CSS only toolkit, which is a major benefit for its high performance and scalability nature. For a website where every byte and second counts, a CSS framework with built-in JavaScript components is more trouble than it's worth. Simply, because you may use your own customised JavaScript code that is compatible with your unique website's requirements.

  6. Naming things is hard. But with Brevis, you don't ever have to think about naming your classes, thanks to our naming convention.

  7. Brevis makes easier to visualize what something looks like just by reading the markup.

  8. It's simple to erase a style by just removing the class; as opposed to component-first frameworks where you usually have to override it. Meaning, you end up writing more CSS.

  9. Brevis is teamwork friendly.

Where is the JavaScript?

Brevis is a CSS only framework.

How is the browser support?

Brevis is compatible with modern versions of:

What’s the difference between Brevis and inline styles?

Same as comparing apples and oranges.

  1. Inline styles directly affect the tag they are written in, without the use of selectors.
  2. Inline styles need the style attribute.

Inline style:

<body style="font-weight:bold;">

Brevis:

<body class="ftwt--7">

They are completely two different things.

How do I memorize all those weird class names?

You don't. Our naming convention is based on word's abbreviations and it follows simple and logical rules. No need to memorize names, just learn the rules and you are good to go.

What about the separation of concerns?

The concerns are still separated. The HTML gives you the structure, and it should work without the CSS. The styling is still applied via CSS.

Will all those classes bloat the size of my HTML?

The bloated stuff is already there, just take a look at yours CSS file(s). What most of CSS frameworks do is to transfer the complexity of UIs to the style sheet. Thus, because larger and similar components reuse the same CSS properties as others, you inevitably end up with duplicate code. So, to answer the question. On the one hand it may increase the HTML size, but on the other hand your CSS file can be incredibly smaller.

Does Brevis have a class for each CSS property?

It doesn't, and it may never will. Like other frameworks, Brevis doesn't try to cover all the CSS spectrum. We are focusing on best practices and real-world usage, to bring the best experience for the users and developers. However, you can always extend Brevis with custom classes for properties that are absent.

Does the CSS declaration order matter?

In the CSS file, it does. Brevis ordering its classes starts from outside the box model and moves inward. Check out brevis.css to see how we did.

Does Brevis enforce any CSS declaration order style?

No, it doesn’t. But you should have a methodology to order your classes. It will be helpful to you and whom you share your code. Remember the order of classes within the HTML class attribute is irrelevant. The order only matters in the CSS file.

How do I extend Brevis modifiers?

We recommend you to create a special modifier called extN. It can work as a complement to some missing property values. So, whatever property you want to extend by adding custom values; the ext is the way to go (with an exception for the colour palette). You can create as many ext modifier as you want. For example:

.lsst--ext1 { list-style: circle }
.w--ext1 { width: 768px }
.w--ext2 { width: 1024px }
.w--ext3 { width: 2048px }
.fts--ext1 { font-size: 128px }

This is not a rule, it's just a suggestion of how to do it. The key to keep consistency. However way you choose to extend Brevis, just sticky with it.

PS: it's OK to have more than one declaration per class, as long as you keep the class immutable.
PPS: it's highly recommended to follow the naming convention. If you don't do it, you may end up with a second naming convention system to remember.