Background Position vs Background Size #11807
Replies: 2 comments
-
With regards to ambigious nature of the For tailwindcss/src/corePlugins.js Lines 1905 to 1907 in 4c34b2e Also of note that Or for tailwindcss/src/corePlugins.js Lines 1884 to 1886 in 4c34b2e If you would like to contribute to the documentation, feel free to send a pull request to the documentation website repository. Footnotes |
Beta Was this translation helpful? Give feedback.
-
just ran into this today after trying to set background size with |
Beta Was this translation helpful? Give feedback.
-
Hey. I've just run into a (small) problem with the background position vs background size properties.
I'll phrase this as a question.
What would you expect
bg-[200%]
to do?Based on the docs, it looks like this could be one of two answers
The actual answer is that background position seems to be picked first if a % is used, while arguably size is more likely for a % over 100. Because both of these are technically valid there is potential for confusion.
So if you want to do effectively
bg-size-[200%]
there doesn't appear to be a means to allow this, despite technically supporting the option.If there is a supported method for implementing both bg size and position as a percent at the same time, I'd love to see an example added to both the page and the arbitrary values docs.
Beta Was this translation helpful? Give feedback.
All reactions