1.0.0-alpha.14 • Published 25 days ago

@studs/styles v1.0.0-alpha.14

Weekly downloads
-
License
MIT
Repository
github
Last release
25 days ago

studs-styles

Base styles, colors, tokens, metrics, and more for STUDS.

  • nvm use 19 - to set NPM to latest (as of this wiritng)
  • npm install - install all required packages.
  • npm start - copies src files to public, compiles Sass, watches all files, and starts Browsersync server at localhost:3000
  • npm run build - compiles and copies files to public and autoprefixes/minifies css

Use npm run build to make production-ready build. Use npm run start for uncompressed css that includes sourcemaps.

Files

  • sass/utilities/_colors.scss - sass color variables
  • sass/utilities/_fonts.scss - font family, and base font styles
  • sass/utilities/_metrics.scss - breakpoints, padding, animation and transition times
  • sass/components/*.scss - put individual components in here. Buttons, form elements, etc. Make sure to add them in sass/components/index.scss so they will be included in the output styles.
  • sass/themes.scss - dark and light themes, motion and contrast variations.
  • sass/overrides.scss - anything that needs to be changed from the base styles and components.

Add your own styles anywhere after these. Because we're using cascading @layer styles, there should be no need to have to use !important anywhere.

Notes

To make sure to separate named colors from purpose and function, only use the css variables in themes.scss.

/* don't do this */
button {
  background: #DF4907;
  color: white;

/* correct */
button {
  background: var(--primary);
  color: var(--on-primary);
}

Also, for some reason updating a style in components causes all styles to drop in the browser. You may need to manually click reload in the browser to see the updated styles. I'm looking into why this happens. --Jp

Build scripts are based on the great work by Stephanie Eckles

How to Publish to NPM

Create a new branch release/...

npm run changeset

Enter a summary of changes

npm run changeset version

Commit changes to GIT

npm run changeset publish

1.0.0-alpha.9

3 months ago

1.0.0-alpha.8

3 months ago

1.0.0-alpha.7

3 months ago

1.0.0-alpha.6

3 months ago

1.0.0-alpha.10

3 months ago

1.0.0-alpha.5

3 months ago

1.0.0-alpha.4

3 months ago

1.0.0-alpha.3

3 months ago

1.0.0-alpha.2

4 months ago

1.0.0-alpha.12

2 months ago

1.0.0-alpha.11

3 months ago

1.0.0-alpha.14

25 days ago

1.0.0-alpha.13

1 month ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.0-beta.8

1 year ago

1.0.0-beta.7

1 year ago

1.0.0-beta.6

1 year ago

1.0.0-beta.5

2 years ago

1.0.0-beta.4

2 years ago

1.0.0-beta.3

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago