Tailwind CSS v1.0 To-Dos
Have been keeping track of this stuff in my personal to-do tracker but publishing them here in case anyone is interested.
Naturally a ton of stuff has already been done for v1.0 and deleted from my to-do list, so this is only the stuff remaining as of today.
Expect this list to grow and change over the next few weeks as I work towards finishing v1.0, but generally these are the things I've got lined up. They aren't in any sort of priority order or anything.
Done/Merged
- [x] Re-evaluate flex-grow/flex-no-grow, etc.
- [x] Re-assess using postcss-selector-parser for escaping
- [x] Update plugins to source their config from theme/variants
- [x] Think about if there's a smarter way to make sure the separator is escaped
- [ ] ~~Pass theme and variants to plugins explicitly?~~ No measurable benefit, easy to add later
- [x] Add new shadows
- [x] Rename config function to theme?
- [x] Fix letterSpacing classes not being escaped
- [x] Add 56 as a width?
- [x] Add extended widths (48, 56, 64) to entire spacing scale?
- [x] Make
flex-*customizable - [ ] ~~Remove
.clearfix?~~ Nah still useful enough to not make people add it themselves. - [x] Add new maxWidth scale
- [x] Revisit which variants to enable by default for split up text style plugins
- [x] Make preflight more hardcore, reset headings, etc.
- [x] Autodetect presence of tailwind.config.js?
- [ ] ~~Headings should inherit line-height like they inherit font-size and font-weight.~~ Not necessary, browser inherits line-height already for headings.
- [x] Inherit font-related properties on form controls by default (line-height, font-family, color, maybe others, see sanitize.css for ideas)
- [x] Use line-height: 1.5 on body or html by default (why not? I never want 1.15 and we set that 🤷♂️)
- [x] Use system font stack by default instead of "sans-serif", I literally never want that either
- [x] Use fontFamily.mono for pre/code if possible, fall back to monospaced (beware double monospace thing)
- [x] Add text-6xl? 64px?
- [x] Add new default color palette
- [x] Bump
smbreakpoint up to 640px? - [x] Inherit color and text-decoration on links
- [x] Reconsider lists core plugin, maybe handle list style only and not padding
- [ ] ~~Re-evaluate truncate, possibly replace with ellipsis-only utility~~ Class is convenient and useful, could still add ellipsis utility separately though
- [x] Consider making
break-normalhandle both properties to provide a nicer experience - [x] Get rid of pin utilities in favor of top/right/bottom/left/inset? Unsure if worth break.
- [x] Consider if container should become a true core plugin instead of an included third-party plugin
- [x] Split whitespace plugin into whitespace and wordBreak/wordWrap?
- [x] Rework CLI for new config structure
- [x] Make sure shadow-outline matches new blue
- [ ] ~~Error if we find
@tailwind preflightin your CSS or keys in the wrong place in your config file to help guide people during the upgrade process?~~ Whatever, can do this if it actually bites people. - [ ] ~~Consider if defaultConfig/defaultTheme need to be separate files or even importable? Maybe make it possible to export a function from your config, and we just pass you the defaults?~~ Will keep these exports for now, we could add function syntax later if it feels like a slicker solution since it is non-breaking
- [x] Make img, canvas, video, etc. block by default, and constrain max width?
- [ ] ~~Make utilities important by default? I always do this on my own projects~~ Easy to tweak yourself and it's nice that inline-styles override utilities if they aren't important
- [x] Maybe pass theme function to config callbacks?
- [ ] Consider trying to make form elements more consistent by default across browsers? BuzzFeed Solid framework pretty good reference for super vanilla looking forms.
- [x] Fix theme('negativeMargin.5') sort of stuff, maybe by negating all values in the default config in the callback
- [x] Write upgrade guide
- [x] Write function/tool to upgrade 0.x config files
PR Opened
- [ ] Consider removing border radius on inputs because of the iOS crap, and fixing radio buttons with just a [type="radio"] selector to keep specificity down
Next (painful)
Next (straightforward)
- [ ] Make sure shadow-inset doesn't suck
- [ ] Update the docs
Next (could wait until after 1.0)
- [ ] Add sanity test for a heavily customized config
- [ ] Allow specifying a base config to extend (extends root level key)
- [ ] Add
disabledvariant? - [ ] Pass parseSelector to plugins?
When is the likely release date? Would love to use it on a project I'm about to start :)
March 20th or 21st 👍
What about adding links in the docs that take you to each of core plugins source code?
Yeah that's a good idea 👍 Will try and fit that in before release, if not can add it shortly after.
Hello - and thx. for tailwind - we're happy users.
There's a spefic preflight styling we're not happy about though:
input::placeholder, textarea::placeholder { color: inherit; opacity: 0.5; }
The color: inherit makes the placeholder color follow the color of the input (of course), but that is a bit too opiniated for us and rather difficult to override without using classes or !important
Hey @chessydk! If we removed that, what would you do to style your placeholders instead? Would you just use the browser default, or would you still write your own classes to do it?
@adamwathan Regarding placeholder: We would set a default color our selves and if needed, set classes.
@chessydk I do not think that you would need !important to override that rule. Your own global css should come after tailwind's preflight, so it can override the same specificity rules.
That's true that tailwind doesn't have placeholder utilities out of the box. I would imagine it could be done maybe with a variant plugin. Or just declare the utilities with plain css.
@chessydk Got it! What I'm wondering is how removing that style would make your life any easier? You would still need to add your own placeholder color, and adding your own placeholder color will still override the one Tailwind sets by default already.
Here's a quick demo showing how you can override those styles by just adding your own CSS in between preflight and the rest of Tailwind's styles:
https://jsfiddle.net/1zcgr0f5/
@adamwathan did you consider following a modular scale for font-size?
@florianbouvot I don't really like the super mathematical modular scales because you end up with fractional values that different browsers round differently. Our system is loosely based in the ideas of modular scales, but normalized to sane whole values that work well with our base-4 spacing system.
@adamwathan I understand, thank you for your feedback
@adamwathan Before the 21st of March, any "dev" build of 1.0 one can begin trying out?
Yeah hoping to get one out today but I've been saying that every day this week 😩 Trying to get all of the breaking changes out of the way if I can, but there are probably still going to be a few even after the first dev build.
@adamwathan What do you think about allow define in the config file variables for classes names and sides?
.{className}{side?}-{size}
The reason is that we use a different naming convention in our utilities library that was written without any generator. We think there is a lot potential using Tailwind to generate the library.
.u-color--black
Prefix: u-*
Property: color
Separator: --
Value: black
We have a fork that has 100% tests passed.
Is it out yet? 😄
Beta is!
https://github.com/tailwindcss/tailwindcss/releases/tag/v1.0.0-beta.1
@adamwathan there is a bit of an issue with :not-italic it throws the following error on beta.3
ERROR in ./assets/styles/app.css (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-1-1!./node_modules/postcss-loader/src??ref--5-oneOf-1-2!./assets/styles/app.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: Cannot read property 'body' of undefined
at /Users/kanirobinson/DigitalProfile/core-pwa/node_modules/@thedigies/hexy/dist/hexy.css:11188:3
at explodeSelector (/Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss-selector-not/dist/index.js:26:33)
at /Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss-selector-not/dist/index.js:41:27
at /Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:239:18
at /Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:135:18
at AtRule.each (/Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:101:16)
at AtRule.walk (/Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:131:17)
at /Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:148:24
at Root.each (/Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:101:16)
at Root.walk (/Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:131:17)
at Root.walkRules (/Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss/lib/container.js:237:19)
at Object.plugin (/Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss-selector-not/dist/index.js:39:11)
at /Users/kanirobinson/DigitalProfile/core-pwa/node_modules/postcss-preset-env/index.cjs.js:186:20
Following Line in question:
.md\:not-italic {
font-style: normal;
}
Make sure you are on the latest version of postcss-selector-not, that's a bug in their library. It looks like you are using postcss-preset-env, so you probably just need to update your version of that.
@adamwathan Thank you for that very prompt response, I'll do this now!