Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure DEFAULT is taken into account for matchVariant #9603

Merged
merged 1 commit into from Oct 18, 2022

Conversation

RobinMalfait
Copy link
Contributor

This means that if you define your matchVariant as:

matchVariant('foo', (value) => '.foo-${value} &')

Then you can't use foo:underline, if you want to be able to use
foo:underline then you have to define a DEFAULT value:

matchVariant('foo', (value) => '.foo-${value} &', {
  values: {
    DEFAULT: 'bar'
  }
})

Now foo:underline will generate .foo-bar & as a selector!

This means that if you define your `matchVariant` as:

```js
matchVariant('foo', (value) => '.foo-${value} &')
```

Then you can't use `foo:underline`, if you want to be able to use
`foo:underline` then you have to define a `DEFAULT` value:

```js
matchVariant('foo', (value) => '.foo-${value} &', {
  values: {
    DEFAULT: 'bar'
  }
})
```

Now `foo:underline` will generate `.foo-bar &` as a selector!
@RobinMalfait RobinMalfait merged commit ddb9b4d into master Oct 18, 2022
@RobinMalfait RobinMalfait deleted the feat/handle-default-in-matchvariant branch October 18, 2022 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant