-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Tailwind utility and component classes #675
Changes from 17 commits
865cea7
db8cc6f
bc0cdb6
5210e46
ba65a36
621edf4
5b06b47
86c29ae
bc1f3aa
b358d26
dac0e7e
daded58
8410af4
a9ec8ec
b0399db
948846f
a251681
84361f6
50172bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* This injects Tailwind's component classes and any component classes | ||
* registered by plugins. | ||
*/ | ||
@tailwind components; | ||
|
||
/** | ||
* This injects Tailwind's utility classes and any utility classes registered | ||
* by plugins. | ||
*/ | ||
@tailwind utilities; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,8 @@ | ||||||
const variableTokens = require("@chanzuckerberg/eds-tokens/lib/json/css-variables-nested.json"); | ||||||
const staticTokens = require("@chanzuckerberg/eds-tokens/lib/json/variables-nested.json"); | ||||||
module.exports = { | ||||||
mode: "jit", | ||||||
purge: ["./src/**/*.{js,jsx,ts,tsx}"], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we only want to use the classes in stories for this repo, and we expect other apps to configure their own
Suggested change
to enforce that more and we could add a comment here about the rationale, e.g. "The main value in utility classes for EDS is in storybook stories. We avoid using them in component styles so there's no chance for conflicts with other libraries." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed and added comment above line and in readme |
||||||
theme: { | ||||||
colors: { | ||||||
transparent: "transparent", | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it'd be nice to mirror the naming convention in traject?
global.css
->tailwind-base.css
(I think we should rename this in traject, will leave a comment in the other PR)tailwindUtilities.css
->tailwind-utilities.css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 This makes sense to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed as suggested