What?

css-[component] Mainly responsible for the UI and Skin Library in nu-systemใ€‚

How to start

$ yarn global add @_nu/cli
$ nu-cli # and select css

It will create a master component for you.

After finish your can go nu-system github and create new repository.

And push your component.

Style Guild

  • Prefixed with nu_, like .nu_btn๏ผ›
  • Status recommended to use native or group selectors with prefix _ like .nu_btn:disabled, .nu_btn._loading๏ผ›

Bad โŒ

<style>
.nu_btn{}
.nu_btn_disabled{}
.nu_btn_loading{}
</style>
<button type="button" class="nu_btn nu_btn_disabled nu_btn_loading">
    hello world!
</button>

Good โœ…

<style>
.nu_btn{}
.nu_btn:disabled{}
.nu_btn._loading{}
</style>
<button type="button" class="nu_btn _loading" disabled>
    hello world!
</button>

Component Tree

[component]
โ”œโ”€โ”€ README.md          
โ”œโ”€โ”€ css                
โ”‚   โ”œโ”€โ”€ index.css       
โ”‚   โ””โ”€โ”€ skins          
โ”‚       โ””โ”€โ”€ default.css
โ””โ”€โ”€ package.json       

Contribution

Fork css-button Fork me as masterใ€‚

Last Updated: 5/16/2020, 3:33:45 PM