woocommerce/plugins/woocommerce-admin/client/stylesheets
Kelly Dwan 9fca535c67 Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203)
* ActivityCard: Update to match new activity panel designs

* Add spacing rhythm system, add the rest of the base colors

* Add styles for the ActivityCard

* Use the new ActivityCard in the orders panel

* Update text color & size

* Disable timestamped test (string changes based on date)

* Use moment to generate a relative timestamp to match “3 days ago” snapshot

* Rename spacing vars

The difference between gap and gap-med is not intuitive, so let’s switch to -small, and change -small to -smallest.
2018-07-16 09:53:38 -04:00
..
README.md Rename sidebar to activity-panel, and refactor code and behavior. 2018-06-28 09:52:45 -04:00
_breakpoints.scss Implement updated activity panel tab design (https://github.com/woocommerce/woocommerce-admin/pull/137) 2018-06-29 11:20:08 -04:00
_colors.scss Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203) 2018-07-16 09:53:38 -04:00
_mixins.scss Add ActivityCard component (https://github.com/woocommerce/woocommerce-admin/pull/86) 2018-05-25 15:34:35 -04:00
_variables.scss Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203) 2018-07-16 09:53:38 -04:00
_wpadmin-reset.scss Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203) 2018-07-16 09:53:38 -04:00

README.md

CSS

Naming: Component classes

To avoid class name collisions between elements of the woo app and to the enclosing WordPress dashboard, class names must adhere to the following guidelines:

Any default export of a folder's index.js must be prefixed with woocommerce- followed by the directory name in which it resides:

.woocommerce-[ directory name ]

(Example: .woocommerce-card from components/card/index.js)

For any descendant of the top-level (index.js) element, prefix using the top-level element's class name separated by two underscores:

.woocommerce-[ directory name ]__[ descendant description ]

(Example: .woocommerce-card__title, or .woocommerce-ellipsis-menu__item)

For optional variations of an element or its descendants, you may use a modifier class, but you must not apply styles to the modifier class directly; only as an additional selector to the element to which the modifier applies:

.woocommerce-[ directory name ].is-[ modifier description ] .woocommerce-[ directory name ]__[ descendant description ].is-[ modifier description ]

(Example: .woocommerce-ellipsis-menu__item.is-active )

In all of the above cases, except in separating the top-level element from its descendants, you must use dash delimiters when expressing multiple terms of a name. You can use .is-* or .has-* to describe element states.

You may observe that these conventions adhere closely to the BEM (Blocks, Elements, Modifiers) CSS methodology, with minor adjustments to the application of modifiers.

Naming: Layout classes

All layout classes use the .woocommerce-layout__ prefix:

.woocommerce-layout__[ section ]

(Example: .woocommerce-layout__activity-panel )

If the section has children elements, prefix a description with the section class name:

.woocommerce-layout__[ section ]-[ descendant description ]

(Example: .woocommerce-layout__activity-panel-title )

Naming: Dashboard classes

All dashboard components use the .woocommerce-dashboard__ prefix:

.woocommerce-dashboard__[ section ]

(Example: .woocommerce-dashboard__widget )

Naming: Analytics classes

All analytics components use the .woocommerce-analytics__ prefix.