ring defaults (#2951)
* add ring defaults Fixes #2911 * add tests for the ringWidth utility + defaults * update changelog
This commit is contained in:
parent
d41ec713a6
commit
d1ef88a61b
5 changed files with 112 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ export default function () {
|
|||
return function ({ addUtilities, theme, variants }) {
|
||||
const colors = flattenColorPalette(theme('ringOffsetColor'))
|
||||
const utilities = _.fromPairs(
|
||||
_.map(colors, (value, modifier) => {
|
||||
_.map(_.omit(colors, 'DEFAULT'), (value, modifier) => {
|
||||
return [
|
||||
nameClass('ring-offset', modifier),
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import nameClass from '../util/nameClass'
|
|||
export default function () {
|
||||
return function ({ addUtilities, theme, variants }) {
|
||||
const utilities = _.fromPairs(
|
||||
_.map(theme('ringOffsetWidth'), (value, modifier) => {
|
||||
_.map(_.omit(theme('ringOffsetWidth'), 'DEFAULT'), (value, modifier) => {
|
||||
return [
|
||||
nameClass('ring-offset', modifier),
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ export default function () {
|
|||
{
|
||||
'*': {
|
||||
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-ring-offset-width': '0px',
|
||||
'--tw-ring-offset-color': '#fff',
|
||||
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
||||
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
||||
'--tw-ring-color': ringColorDefault,
|
||||
'--tw-ring-offset-shadow': '0 0 #0000',
|
||||
'--tw-ring-shadow': '0 0 #0000',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue