
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
@cypress-design/css
Advanced tools
We style every component using a utility first CSS framework: TailwindCSS. Install it in your project to render the components properly.
We style every component using a utility first CSS framework: TailwindCSS. Install it in your project to render the components properly.
To do that, follow the two steps below:
yarn add -D @cypress-design/css
We bundle all the css imported to any of the files in this package into one file in the dist folder - index.css
so that users of this package can import the css styles of this package and use it in their projects.
When building this package, we have a script generate-colors-css.ts
to generate the file colors.css
which recreates all the cyColors
from color-constants.ts
as css variables. If a color needs to be added or updated, only the object cyColors
in color-constants.ts
needs to be updated. Then, we need to rebuild the package so that colors.css
can be regenerated so you should run:
cd css && yarn build
In your .css
files add:
@import "@cypress-design/css/index.css";
In your .scss
files add:
@use "@cypress-design/css/index.css" as *
and then you can use the variables from colors.css
like this:
border: 1px solid var(--cy-gray-800);
If windicss is installed, uninstall it first:
import 'virtual:windi.css'
Install tailwind: Follow the tailwind docs
Finally update your tailwind config file.
This config is less verbose but only allows you to customize the files scanned.
// tailwind.config.cjs
const { TailwindConfig } = require('@cypress-design/css')
module.exports = TailwindConfig([
'./index.html',
'./src/**/*.{vue,js,ts,jsx,tsx}',
])
If you plan on configuring
// tailwind.config.cjs
const cypressCSS = require('@cypress-design/css')
/** @type {import('tailwindcss').Config} */
module.exports = {
presets: [cypressCSS.TailwindConfig()],
content: {
files: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
extract: ['vue', 'js', 'tsx'].reduce((acc, ext) => {
acc[ext] = cypressCSS.TailwindIconExtractor
return acc
}, {}),
},
}
const { CyCSSWebpackPlugin } = require('@cypress-design/css')
module.exports = {
plugins: [
CyCSSWebpackPlugin({
scan: {
include: ['src/**/*.@(tsx|ts|js|vue)'],
},
}),
],
}
import { defineConfig } from 'vite'
import { CyCSSVitePlugin } from '@cypress-design/css'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
CyCSSVitePlugin({
scan: {
include: ['/src/**/*.@(tsx|ts|js|vue)'],
},
}),
],
})
NOTE: Add your html page and all your react and vue component files to the
scan.include
array. This helps WindiCSS determine which class to include in the final generated CSS.
FAQs
We style every component using a utility first CSS framework: TailwindCSS. Install it in your project to render the components properly.
We found that @cypress-design/css demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.