Skip to content

Commit

Permalink
feat(core,presets)!: add slack around layers order value (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
chu121su12 committed Jun 7, 2022
1 parent 5708e51 commit a58ebe0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/config.ts
Expand Up @@ -12,7 +12,7 @@ export function resolveShortcuts(shortcuts: UserShortcuts): Shortcut[] {

const defaultLayers = {
preflights: -100,
shortcuts: -1,
shortcuts: -10,
default: 0,
}

Expand Down
4 changes: 1 addition & 3 deletions packages/preset-icons/src/index.ts
Expand Up @@ -74,9 +74,7 @@ export const preset = (options: IconsOptions = {}): Preset => {
name: '@unocss/preset-icons',
enforce: 'pre',
options,
layers: {
icons: -10,
},
layers: { icons: -30 },
rules: [[
new RegExp(`^${prefix}([a-z0-9:-]+)(?:\\?(mask|bg|auto))?$`),
async ([full, body, _mode = mode]) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-typography/src/index.ts
Expand Up @@ -65,7 +65,7 @@ export function presetTypography(options?: TypographyOptions): Preset {
return {
name: '@unocss/preset-typography',
enforce: 'post',
layers: { typography: -1 },
layers: { typography: -20 },
rules: [
[
selectorNameRE,
Expand Down
4 changes: 1 addition & 3 deletions packages/preset-web-fonts/src/index.ts
Expand Up @@ -66,9 +66,7 @@ const preset = (options: WebFontsOptions = {}): Preset<any> => {

const preset: Preset<any> = {
name: '@unocss/preset-web-fonts',
layers: {
[layerName]: -20,
},
layers: { [layerName]: -40 },
preflights: [
{
async getCSS() {
Expand Down

0 comments on commit a58ebe0

Please sign in to comment.