Skip to content

Commit 24fe915

Browse files
committed
run prettier
1 parent 7402e33 commit 24fe915

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../tsconfig.base.json",
33
"compilerOptions": {
4-
"allowSyntheticDefaultImports":true
5-
}
4+
"allowSyntheticDefaultImports": true,
5+
},
66
}

packages/tailwindcss/src/utilities.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ interface SuggestionGroup {
1919
type SuggestionDefinition =
2020
| string
2121
| {
22-
supportsNegative?: boolean
23-
values?: string[]
24-
modifiers?: string[]
25-
valueThemeKeys?: ThemeKey[]
26-
modifierThemeKeys?: ThemeKey[]
27-
hasDefaultValue?: boolean
28-
}
22+
supportsNegative?: boolean
23+
values?: string[]
24+
modifiers?: string[]
25+
valueThemeKeys?: ThemeKey[]
26+
modifierThemeKeys?: ThemeKey[]
27+
hasDefaultValue?: boolean
28+
}
2929

3030
export type UtilityOptions = {
3131
types: string[]

packages/tailwindcss/src/variants.ts

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ export class Variants {
156156
? this.variants.get(child)
157157
: child.kind === 'arbitrary'
158158
? // This isn't strictly necessary but it'll allow us to bail quickly
159-
// when parsing candidates
160-
{ compounds: compoundsForSelectors([child.selector]) }
159+
// when parsing candidates
160+
{ compounds: compoundsForSelectors([child.selector]) }
161161
: this.variants.get(child.root)
162162

163163
// One of the variants don't exist
@@ -331,7 +331,7 @@ export function createVariants(theme: Theme): Variants {
331331
)
332332
}
333333

334-
variants.static('force', () => { }, { compounds: Compounds.Never })
334+
variants.static('force', () => {}, { compounds: Compounds.Never })
335335
staticVariant('*', [':where(& > *)'], { compounds: Compounds.Never })
336336

337337
function negateConditions(ruleName: string, conditions: string[]) {
@@ -464,7 +464,11 @@ export function createVariants(theme: Theme): Variants {
464464
})
465465

466466
// TODO: Tweak group, peer, has to ignore intermediate `&` selectors (maybe?)
467-
if (ruleNode.kind === 'style-rule' && ruleNode.selector === '&' && ruleNode.nodes.length === 1) {
467+
if (
468+
ruleNode.kind === 'style-rule' &&
469+
ruleNode.selector === '&' &&
470+
ruleNode.nodes.length === 1
471+
) {
468472
Object.assign(ruleNode, ruleNode.nodes[0])
469473
}
470474

@@ -622,7 +626,11 @@ export function createVariants(theme: Theme): Variants {
622626
'after',
623627
(v) => {
624628
v.nodes = [
625-
styleRule('&::after', [contentProperties(), decl('content', 'var(--tw-content)'), ...v.nodes]),
629+
styleRule('&::after', [
630+
contentProperties(),
631+
decl('content', 'var(--tw-content)'),
632+
...v.nodes,
633+
]),
626634
]
627635
},
628636
{ compounds: Compounds.Never },
@@ -713,7 +721,9 @@ export function createVariants(theme: Theme): Variants {
713721
if (!variant.value || variant.modifier) return null
714722

715723
if (variant.value.kind === 'arbitrary') {
716-
ruleNode.nodes = [styleRule(`&[aria-${quoteAttributeValue(variant.value.value)}]`, ruleNode.nodes)]
724+
ruleNode.nodes = [
725+
styleRule(`&[aria-${quoteAttributeValue(variant.value.value)}]`, ruleNode.nodes),
726+
]
717727
} else {
718728
ruleNode.nodes = [styleRule(`&[aria-${variant.value.value}="true"]`, ruleNode.nodes)]
719729
}
@@ -734,7 +744,9 @@ export function createVariants(theme: Theme): Variants {
734744
variants.functional('data', (ruleNode, variant) => {
735745
if (!variant.value || variant.modifier) return null
736746

737-
ruleNode.nodes = [styleRule(`&[data-${quoteAttributeValue(variant.value.value)}]`, ruleNode.nodes)]
747+
ruleNode.nodes = [
748+
styleRule(`&[data-${quoteAttributeValue(variant.value.value)}]`, ruleNode.nodes),
749+
]
738750
})
739751

740752
variants.functional('nth', (ruleNode, variant) => {
@@ -853,16 +865,16 @@ export function createVariants(theme: Theme): Variants {
853865
let aBucket =
854866
aIsCssFunction === -1
855867
? // No CSS function found, bucket by unit instead
856-
aValue.replace(/[\d.]+/g, '')
868+
aValue.replace(/[\d.]+/g, '')
857869
: // CSS function found, bucket by function name
858-
aValue.slice(0, aIsCssFunction)
870+
aValue.slice(0, aIsCssFunction)
859871

860872
let zBucket =
861873
zIsCssFunction === -1
862874
? // No CSS function found, bucket by unit
863-
zValue.replace(/[\d.]+/g, '')
875+
zValue.replace(/[\d.]+/g, '')
864876
: // CSS function found, bucket by function name
865-
zValue.slice(0, zIsCssFunction)
877+
zValue.slice(0, zIsCssFunction)
866878

867879
let order =
868880
// Compare by bucket name

0 commit comments

Comments
 (0)