Skip to content

Commit ee16cb0

Browse files
committed
perf: configure css layers for correct order
1 parent 42d8c8b commit ee16cb0

4 files changed

Lines changed: 23 additions & 91 deletions

File tree

app/assets/main.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@layer properties, theme, base, icons, typography, shortcuts, default;
2+
13
/* Base reset and defaults */
24
*,
35
*::before,

test/nuxt/a11y.spec.ts

Lines changed: 19 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,7 @@ describe('component accessibility audits', () => {
530530
slots: { default: 'Button link content' },
531531
})
532532
const results = await runAxe(component)
533-
/** @todo contrast issue - increase contrast */
534-
expect(results.violations).length(1)
535-
expect(results.violations[0]?.id).toEqual('color-contrast')
533+
expect(results.violations).toEqual([])
536534
})
537535

538536
it('should have no accessibility violations as primary button', async () => {
@@ -541,9 +539,7 @@ describe('component accessibility audits', () => {
541539
slots: { default: 'Button link content' },
542540
})
543541
const results = await runAxe(component)
544-
/** @todo contrast issue - increase contrast */
545-
expect(results.violations).length(1)
546-
expect(results.violations[0]?.id).toEqual('color-contrast')
542+
expect(results.violations).toEqual([])
547543
})
548544

549545
it('should have no accessibility violations as small button', async () => {
@@ -557,9 +553,7 @@ describe('component accessibility audits', () => {
557553
slots: { default: 'Button link content' },
558554
})
559555
const results = await runAxe(component)
560-
/** @todo contrast issue - increase contrast */
561-
expect(results.violations).length(1)
562-
expect(results.violations[0]?.id).toEqual('color-contrast')
556+
expect(results.violations).toEqual([])
563557
})
564558
})
565559

@@ -1146,9 +1140,7 @@ describe('component accessibility audits', () => {
11461140
},
11471141
})
11481142
const results = await runAxe(component)
1149-
/** @todo contrast issue - increase contrast */
1150-
expect(results.violations).length(1)
1151-
expect(results.violations[0]?.id).toEqual('color-contrast')
1143+
expect(results.violations).toEqual([])
11521144
})
11531145
})
11541146

@@ -1927,9 +1919,7 @@ describe('component accessibility audits', () => {
19271919
},
19281920
})
19291921
const results = await runAxe(component)
1930-
/** @todo contrast issue - increase contrast */
1931-
expect(results.violations).length(1)
1932-
expect(results.violations[0]?.id).toEqual('color-contrast')
1922+
expect(results.violations).toEqual([])
19331923
})
19341924

19351925
it('should have no accessibility violations for nodep variant with simple replacement', async () => {
@@ -1945,9 +1935,7 @@ describe('component accessibility audits', () => {
19451935
},
19461936
})
19471937
const results = await runAxe(component)
1948-
/** @todo contrast issue - increase contrast */
1949-
expect(results.violations).length(1)
1950-
expect(results.violations[0]?.id).toEqual('color-contrast')
1938+
expect(results.violations).toEqual([])
19511939
})
19521940

19531941
it('should have no accessibility violations for info variant with documented replacement', async () => {
@@ -1963,9 +1951,7 @@ describe('component accessibility audits', () => {
19631951
},
19641952
})
19651953
const results = await runAxe(component)
1966-
/** @todo contrast issue - increase contrast */
1967-
expect(results.violations).length(1)
1968-
expect(results.violations[0]?.id).toEqual('color-contrast')
1954+
expect(results.violations).toEqual([])
19691955
})
19701956
})
19711957

@@ -2699,9 +2685,7 @@ describe('component accessibility audits', () => {
26992685
props: { type: 'user', name: 'exactuser', isExactMatch: true },
27002686
})
27012687
const results = await runAxe(component)
2702-
/** @todo contrast issue - increase contrast */
2703-
expect(results.violations).length(1)
2704-
expect(results.violations[0]?.id).toEqual('color-contrast')
2688+
expect(results.violations).toEqual([])
27052689
})
27062690
})
27072691

@@ -2802,9 +2786,7 @@ describe('component accessibility audits', () => {
28022786
},
28032787
})
28042788
const results = await runAxe(component)
2805-
/** @todo contrast issue - increase contrast */
2806-
expect(results.violations).length(1)
2807-
expect(results.violations[0]?.id).toEqual('color-contrast')
2789+
expect(results.violations).toEqual([])
28082790
})
28092791

28102792
it('should have no accessibility violations with non-latest version', async () => {
@@ -3030,9 +3012,7 @@ describe('component accessibility audits', () => {
30303012
})(),
30313013
})
30323014
const results = await runAxe(component)
3033-
/** @todo contrast issue - increase contrast */
3034-
expect(results.violations).length(1)
3035-
expect(results.violations[0]?.id).toEqual('color-contrast')
3015+
expect(results.violations).toEqual([])
30363016
})
30373017
})
30383018

@@ -3105,9 +3085,7 @@ describe('component accessibility audits', () => {
31053085
})(),
31063086
})
31073087
const results = await runAxe(component)
3108-
/** @todo contrast issue - increase contrast */
3109-
expect(results.violations).length(1)
3110-
expect(results.violations[0]?.id).toEqual('color-contrast')
3088+
expect(results.violations).toEqual([])
31113089
})
31123090

31133091
it('should have no accessibility violations with custom content', async () => {
@@ -3125,9 +3103,7 @@ describe('component accessibility audits', () => {
31253103
})(),
31263104
})
31273105
const results = await runAxe(component)
3128-
/** @todo contrast issue - increase contrast */
3129-
expect(results.violations).length(1)
3130-
expect(results.violations[0]?.id).toEqual('color-contrast')
3106+
expect(results.violations).toEqual([])
31313107
})
31323108
})
31333109

@@ -3221,9 +3197,7 @@ describe('component accessibility audits', () => {
32213197
},
32223198
})
32233199
const results = await runAxe(component)
3224-
/** @todo contrast issue - increase contrast */
3225-
expect(results.violations).length(1)
3226-
expect(results.violations[0]?.id).toEqual('color-contrast')
3200+
expect(results.violations).toEqual([])
32273201
})
32283202

32293203
it('should have no accessibility violations with word wrap enabled', async () => {
@@ -3314,9 +3288,7 @@ describe('component accessibility audits', () => {
33143288
},
33153289
})
33163290
const results = await runAxe(component)
3317-
/** @todo contrast issue - increase contrast */
3318-
expect(results.violations).length(1)
3319-
expect(results.violations[0]?.id).toEqual('color-contrast')
3291+
expect(results.violations).toEqual([])
33203292
})
33213293

33223294
it('should have no accessibility violations with selected file', async () => {
@@ -3329,9 +3301,7 @@ describe('component accessibility audits', () => {
33293301
},
33303302
})
33313303
const results = await runAxe(component)
3332-
/** @todo contrast issue - increase contrast */
3333-
expect(results.violations).length(1)
3334-
expect(results.violations[0]?.id).toEqual('color-contrast')
3304+
expect(results.violations).toEqual([])
33353305
})
33363306

33373307
it('should have no accessibility violations with file filter', async () => {
@@ -3344,9 +3314,7 @@ describe('component accessibility audits', () => {
33443314
},
33453315
})
33463316
const results = await runAxe(component)
3347-
/** @todo contrast issue - increase contrast */
3348-
expect(results.violations).length(1)
3349-
expect(results.violations[0]?.id).toEqual('color-contrast')
3317+
expect(results.violations).toEqual([])
33503318
})
33513319

33523320
it('should have no accessibility violations with warnings', async () => {
@@ -3362,9 +3330,7 @@ describe('component accessibility audits', () => {
33623330
},
33633331
})
33643332
const results = await runAxe(component)
3365-
/** @todo contrast issue - increase contrast */
3366-
expect(results.violations).length(1)
3367-
expect(results.violations[0]?.id).toEqual('color-contrast')
3333+
expect(results.violations).toEqual([])
33683334
})
33693335

33703336
it('should have no accessibility violations with no dependency changes', async () => {
@@ -3380,9 +3346,7 @@ describe('component accessibility audits', () => {
33803346
},
33813347
})
33823348
const results = await runAxe(component)
3383-
/** @todo contrast issue - increase contrast */
3384-
expect(results.violations).length(1)
3385-
expect(results.violations[0]?.id).toEqual('color-contrast')
3349+
expect(results.violations).toEqual([])
33863350
})
33873351
})
33883352

@@ -3436,9 +3400,7 @@ describe('component accessibility audits', () => {
34363400
},
34373401
})
34383402
const results = await runAxe(component)
3439-
/** @todo contrast issue - increase contrast */
3440-
expect(results.violations).length(1)
3441-
expect(results.violations[0]?.id).toEqual('color-contrast')
3403+
expect(results.violations).toEqual([])
34423404
})
34433405
})
34443406

uno-transformer-icon-inline-block.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

uno.config.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
import type { Theme } from '@unocss/preset-wind4/theme'
1010
import { presetRtl } from './uno-preset-rtl'
1111
import { presetA11y } from './uno-preset-a11y'
12-
import { transformerIconInlineBlock } from './uno-transformer-icon-inline-block'
1312

1413
const customIcons = {
1514
'agent-skills':
@@ -39,12 +38,8 @@ export default defineConfig({
3938
// keep this preset last
4039
...(process.env.CI ? [] : [presetRtl(), presetA11y()]),
4140
].filter(Boolean),
42-
content: {
43-
pipeline: {
44-
exclude: [/\.(css|postcss|sass|scss|less|stylus|styl)($|\?)/, /[/\\]node_modules[/\\]/],
45-
},
46-
},
47-
transformers: [transformerDirectives(), transformerVariantGroup(), transformerIconInlineBlock()],
41+
outputToCssLayers: true,
42+
transformers: [transformerDirectives(), transformerVariantGroup()],
4843
theme: {
4944
spacing: { DEFAULT: '4px' },
5045
font: {

0 commit comments

Comments
 (0)