Skip to content

css logic

Charles de Beauchesne edited this page Apr 17, 2019 · 3 revisions

The CSS framework used on c2c_ui is bulma : https://bulma.io/

It comes with an exhaustive documentation : https://bulma.io/documentation/

Here is the logic you must follow :

  • does bulma have a corresponding class for what you need? If yes, you must use it.
  • if bulma does not provide the class you need, but this class will be widely used, then you can add it in /src/assets/sass/helpers.scss
    • please follow bulma naming logic
    • but as Bulma provides a large set of class, it must stay an excpetion.
  • then, if your class belongs to your componenent, and only to your componenent
    • add it in <style>part
    • always use scopedstyle
    • do not hesitate to import variables and use them

Notice that bulma is not entirely included in the project. We import only parts we use. If you need to use a bulma feature not yet included, simply add it in main.scss. By the way, before doing that, please consider the solution to write your own css, if it's easy and fast. The lighter the final bundle is, the happier the user is !