You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I think adding a way to set padding: inherit would be a good idea as it could be useful in certain situations.
Absolute positioned element inside a relative positioned parent container, that has padding, ignore said padding (explanation on stack overflow). This issue often crops up in overlays with a clickable close button. In order to move the absolute positioned close button to one of the corners one needs to give it a top/bottom/left/right value that is equal the padding of the parent, so that the close button is aligned properly.
Using padding: inherit we can simplify this slightly and just use the same padding as the parent without actually repeating the value for padding. I created an example here: https://play.tailwindcss.com/H99MdZoHOQ and prepared a draft pr here: #14153
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I think adding a way to set
padding: inherit
would be a good idea as it could be useful in certain situations.Absolute positioned element inside a relative positioned parent container, that has padding, ignore said padding (explanation on stack overflow). This issue often crops up in overlays with a clickable close button. In order to move the absolute positioned close button to one of the corners one needs to give it a top/bottom/left/right value that is equal the padding of the parent, so that the close button is aligned properly.
Using
padding: inherit
we can simplify this slightly and just use the same padding as the parent without actually repeating the value for padding. I created an example here: https://play.tailwindcss.com/H99MdZoHOQ and prepared a draft pr here: #14153Cheers
Beta Was this translation helpful? Give feedback.
All reactions