Skip to content

Commit

Permalink
fix(preset-mini): fix first-letter and first-line pseudo elements (
Browse files Browse the repository at this point in the history
  • Loading branch information
sibbng committed May 19, 2022
1 parent 865c731 commit cfe5674
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/preset-mini/src/variants/pseudo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type { PresetMiniOptions } from '..'

const PseudoClasses: Record<string, string> = Object.fromEntries([
// pseudo elements part 1
['first-letter', '::first'],
['first-line', '::first'],
['first-letter', '::first-letter'],
['first-line', '::first-line'],

// location
'any-link',
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/preset-mini.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ div:hover .group-\\\\[div\\\\:hover\\\\]-\\\\[combinator\\\\:test-4\\\\]{combina
.bg-teal-400\\\\/\\\\[\\\\.55\\\\]{background-color:rgba(45,212,191,.55);}
.bg-teal-500\\\\/\\\\[55\\\\%\\\\]{background-color:rgba(20,184,166,55%);}
.file\\\\:bg-violet-50::file-selector-button{--un-bg-opacity:1;background-color:rgba(245,243,255,var(--un-bg-opacity));}
.first-letter\\\\:bg-green-400::first,
.first-line\\\\:bg-green-400::first{--un-bg-opacity:1;background-color:rgba(74,222,128,var(--un-bg-opacity));}
.first-letter\\\\:bg-green-400::first-letter,
.first-line\\\\:bg-green-400::first-line{--un-bg-opacity:1;background-color:rgba(74,222,128,var(--un-bg-opacity));}
.focus-within\\\\:has-first\\\\:checked\\\\:bg-gray\\\\/20:focus-within:has(:first-child):checked,
.focus-within\\\\:where-first\\\\:checked\\\\:bg-gray\\\\/20:focus-within:where(:first-child):checked{background-color:rgba(156,163,175,0.2);}
.hover\\\\:file\\\\:bg-violet-100:hover::file-selector-button{--un-bg-opacity:1;background-color:rgba(237,233,254,var(--un-bg-opacity));}
Expand Down

0 comments on commit cfe5674

Please sign in to comment.