2.4.0 • Published 9 days ago

@wwtdev/bsds-css v2.4.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
9 days ago

BSDS CSS Framework

Installation

npm install --save @wwtdev/bsds-css

You can import the minified stylesheet in your project's main.js like so:

import '@wwtdev/bsds-css/dist/wwt-bsds.min.css'

Using with Tailwind CSS

If your project uses Tailwind, complete the steps above and then install Tailwind if you haven't already. You can follow the instructions in their docs with the exceptions listed below.

1. Add the WWT Preset to the Tailwind config.

For new projects, we recommend that you use the provided config file as a preset. When setting up the tailwind.config.js file, import the WWT preset from the CSS Framework package. Note that wwt-bsds-preset.js sets config.corePlugins.preflight: false by default; we do this to apply our style resets instead of the Tailwind resets.

/* tailwind.config.js */

module.exports = {
  presets: [require('@wwtdev/bsds-css/dist/wwt-bsds-preset.js')]
};

While the foregoing setup is our recommended method, we have still put in effort to ensure that wwt-bsds-preset.js works as a base configuration in conjunction with the tailwind defaults and reset as well. So this should still work as an alternative if needed, though it is not the focus/priority of our project:

/* tailwind.config.js */

const wwtConfig = require('@wwtdev/bsds-css/dist/wwt-bsds-preset.js')
module.exports = {
  ...wwtConfig,
  corePlugins: { preflight: false }
};

2. Tailwind CSS Directives

To prevent conflicts with our CSS Framework, only include the base and utilities directives.

Since our CSS has its own reset and default styles, we prevent Tailwind's base reset styles from loading, via a setting in our WWT Preset. The only styles that will be used from base are Tailwind CSS variables, which are needed in order to ensure all Tailwind classes work as expected.

/* src/styles/tailwind.css */

@tailwind base;
@tailwind utilities;

Once you have completed the Tailwind installation steps, you can use the classes generated from the preset.

3. Dark Mode-compatible "semantic" color utilities

We've extended the TW theme with color utilities that will automatically adjust when using dark mode. These classes require the CSS custom properties defined in the global stylesheet (wwt-bsds.css). If you're not bringing that stylesheet in, either disregard these classes or manually include the properties from tokens.css and global.css in your project.

4. Order matters!

In your project's stylesheet ordering, the base Tailwind styles should come first, then the BSDS CSS framework.

/* src/main.js */

// TW
import './styles/tailwind.css'

// Blue Steel Styles
import '@wwtdev/bsds-css/dist/wwt-bsds.min.css'

Browser Support

Our styles are compiled using Post CSS and Autoprefixer using the defaults setting.

2.4.0

9 days ago

2.3.4

26 days ago

2.3.3

1 month ago

2.3.2

1 month ago

2.3.1

2 months ago

2.3.0

2 months ago

2.2.0

2 months ago

2.1.4

2 months ago

2.1.5

2 months ago

2.1.3

3 months ago

2.1.2

3 months ago

2.1.1

3 months ago

2.1.0

3 months ago

2.0.9

4 months ago

2.0.8

4 months ago

2.0.7

4 months ago

2.0.5

4 months ago

2.0.6

4 months ago

2.0.4

4 months ago

2.0.3

4 months ago

2.0.2

4 months ago

2.0.1

4 months ago

2.0.0

4 months ago

1.16.5

5 months ago

1.16.4

5 months ago

1.16.3

5 months ago

1.16.2

5 months ago

1.16.1

5 months ago

1.16.0

5 months ago

1.15.15

5 months ago

1.15.14

5 months ago

1.15.12

5 months ago

1.15.13

5 months ago

1.15.0

6 months ago

1.14.1

7 months ago

1.14.0

7 months ago

1.13.1

7 months ago

1.13.0

7 months ago

1.12.0

7 months ago

1.15.4

5 months ago

1.15.3

6 months ago

1.15.2

6 months ago

1.15.1

6 months ago

1.15.10

5 months ago

1.15.8

5 months ago

1.6.4

9 months ago

1.15.11

5 months ago

1.15.7

5 months ago

1.9.0

8 months ago

1.8.1

8 months ago

1.6.3

9 months ago

1.15.6

5 months ago

1.8.0

8 months ago

1.6.2

10 months ago

1.15.5

5 months ago

1.7.0

8 months ago

1.6.1

10 months ago

1.5.2

10 months ago

1.6.0

10 months ago

1.5.1

10 months ago

1.5.0

10 months ago

1.4.0

10 months ago

1.15.9

5 months ago

1.6.5

9 months ago

1.11.0

7 months ago

1.10.0

7 months ago

1.2.0

12 months ago

1.1.0

12 months ago

1.3.0

11 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.3

2 years ago