Replies: 1 comment
-
|
I agreed with your idea and ended up patching tailwindcss myself. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'd like to propose adding a
DEFAULTkey totheme.placeholderColorand referencing it in preflight.Some core plugins (such as ringColor, borderColor and dropShadow) use a
DEFAULTvalue, while others do not (such as placeholderColor). I don't know how this choice gets made, but I'd like to make a pitch for addingDEFAULTtoplaceholderColor.Currently in
preflight.css, theme colors are referenced twice: (1) to set the default border color……and (2) to set the default placeholder color…
This feels like an oversight.
To change the default placeholder color, I need to either redeclare it with
@basein some stylesheet (which I might not have) or setcolors.gray.400to my desired placeholder color (which might not be feasible). It would be great if I could setplaceholderColor.DEFAULTin my config as I do withborderColor.DEFAULTandringColor.DEFAULT.What do you think?
I would be happy to provide a PR. I think we can add this without breaking changes:
// src/css/preflight.css input::placeholder, textarea::placeholder { opacity: 1; /* 1 */ - color: theme('colors.gray.400', #9ca3af); /* 2 */ + color: theme('placeholderColor.DEFAULT', #9ca3af); /* 2 */ } // stubs/defaultConfig.stub.js padding: ({ theme }) => theme('spacing'), - placeholderColor: ({ theme }) => theme('colors'), + placeholderColor: ({ theme }) => ({ + DEFAULT: theme('colors.gray.400', #9ca3af), + ...theme('colors'), + }), placeholderOpacity: ({ theme }) => theme('opacity'),Beta Was this translation helpful? Give feedback.
All reactions