@s-ui/theme

8.127.0 • Public • Published

SUI Components Theme

This repository contains:

  • Generic variables to initialize default values and component styles.
  • A set of placeholders ready to style your component (buttons, tabs, forms, grid system...).
  • Functions and mixins helpers.

Usage

Install sui-theme in your project:

npm install @s-ui/theme --save

Import sui-theme into your sui-component including the path in index.scss:

@import '~@s-ui/theme/lib/index';

If you want to customize your components, create your own theme and add it to your component just before the sui-theme import.

@import '../custom-settings';
@import '~@s-ui/theme/lib/index';

Upgrade from theme-basic@7

Compatibility variables are still available to import manually.

Import only what you need, in inheritance order

For instance:

@import '../custom-settings';
@import '~@s-ui/theme/lib/settings-compat-v7/color';
@import '~@s-ui/theme/lib/settings-compat-v7/spacing';
@import '~@s-ui/theme/lib/index';

Find below the compat varible groups available:

Also, if you need it all for older components, you can do

@import '~@s-ui/theme/lib/settings-compat-v7/index';
@import '~@s-ui/theme/lib/index';

Media queries and breakpoints

Rules & Definitions

  • Breakpoints must be exactly xxs, xs, s, m, l, xl, xxl
  • For new implementations, the only allowed media query is media-breakpoint-up
  • media-breakpoint-down, media-breakpoint-only and media-breakpoint-between are deprecated and only kept for legacy reasons.

Reason

  • We want to create all our components mobile first

Legacy components

  • Keep in mind that refactoring legacy components in order to make it rules compliant would suppose a breaking change, so a new major must be released.

Links

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @s-ui/theme

      Weekly Downloads

      2,464

      Version

      8.127.0

      License

      MIT

      Unpacked Size

      69.3 kB

      Total Files

      56

      Last publish

      Collaborators

      • thomas.page.ext
      • victoria.pasichnyk.ext
      • daniel.perez.ext
      • albert.peiro
      • frandelacasa-adevinta
      • mariapaula.forero.ext
      • hpintos_adevinta
      • sziauberyte
      • victor.perez.adevinta
      • oscar-raig-adevinta
      • carlos.gonzalezl
      • carolina.mallo.ext
      • david.nieto
      • ferran.simon
      • xavi_conejo
      • sergi.quintela
      • jamile.radloff
      • xavi_ballestar
      • luz_adv
      • ignacio.rodriguez
      • carlosvillu-adevinta
      • diegomr
      • arturo.vicente
      • adria.velardos
      • emiliovz
      • dann41
      • ruben-martin
      • pol.valls
      • cristina.rodriguez.duque
      • sergio.escano
      • marc.benito
      • azahara
      • patricio.sartore
      • giovanny.sayas.ext
      • david.cuadrado.ext
      • alex.castells
      • beatrizip
      • pablo.rey-adevinta
      • sergiocollado
      • mango.sanchezredondo
      • cristhianb
      • alisa_bayanova
      • davidmartin2108
      • ferrangbtw
      • estefania_garcia
      • belen.santos
      • alfredo.arronte
      • joanleon-adv
      • giodelabarrera.adevinta
      • luis-garrido
      • aitor.rodriguez
      • jordi.munoz
      • oscar_ramirez
      • ignacio_navarro
      • a.ferrer
      • gfabregoadv
      • izeller
      • salvador.juan
      • oriol.egea
      • ivanmlaborda
      • alejandro.ferrante
      • pa.chruscinski.ext
      • isabelgomez87
      • jenifer.lopez
      • daniela.aguilera
      • pablogs
      • javier.miguel
      • oscar.gomez
      • marian.lucaci
      • alverd004
      • oriol.puig
      • nacho_torrella
      • xavi.murcia
      • chloe.leteinturier
      • javiauso
      • alfredo.zimperz
      • francisco.ruiz.lloret
      • fermin.adevinta
      • andresadv
      • schibstedspain