import type { Rule } from '@unocss/core' ; import { colorResolver , handler as h } from '@unocss/preset-mini/utils' ; export const listStyle = [ [ /^list-(disc|circle|square|decimal|zero-decimal|greek|roman|upper-roman|alpha|upper-alpha)(?:-(outside|inside))?$/ , ( [ , style , position ] ) => { if ( position != null ) { return { 'list-style-position' : position , 'list-style-type' : style , } ; } return { 'list-style-type' : style } ; } ] , [ 'list-outside' , { 'list-style-position' : 'outside' } ] , [ 'list-inside' , { 'list-style-position' : 'inside' } ] , [ 'list-none' , { 'list-style-type' : 'none' } ] , ] ; export const accents = [ [ /^accent-(.+)$/ , colorResolver ( 'accent-color' , 'accent' ) ] , [ /^accent-op(?:acity)?-?(.+)$/ , ( [ , d ] ) => ( { '--un-accent-opacity' : h . bracket . percent ( d ) } ) ] , ] ; export const carets = [ [ /^caret-(.+)$/ , colorResolver ( 'caret-color' , 'caret' ) ] , [ /^caret-op(?:acity)?-?(.+)$/ , ( [ , d ] ) => ( { '--un-caret-opacity' : h . bracket . percent ( d ) } ) ] , ] ; export const imageRenderings = [ [ 'image-render-auto' , { 'image-rendering' : 'auto' } ] , [ 'image-render-edge' , { 'image-rendering' : 'crisp-edges' } ] , [ 'image-render-pixel' , [ [ '-ms-interpolation-mode' , 'nearest-neighbor' ] , [ 'image-rendering' , '-webkit-optimize-contrast' ] , [ 'image-rendering' , '-moz-crisp-edges' ] , [ 'image-rendering' , '-o-pixelated' ] , [ 'image-rendering' , 'pixelated' ] , ] ] , ] ; export const overscrolls = [ [ 'overscroll-auto' , { 'overscroll-behavior' : 'auto' } ] , [ 'overscroll-contain' , { 'overscroll-behavior' : 'contain' } ] , [ 'overscroll-none' , { 'overscroll-behavior' : 'none' } ] , [ 'overscroll-x-auto' , { 'overscroll-behavior-x' : 'auto' } ] , [ 'overscroll-x-contain' , { 'overscroll-behavior-x' : 'contain' } ] , [ 'overscroll-x-none' , { 'overscroll-behavior-x' : 'none' } ] , [ 'overscroll-y-auto' , { 'overscroll-behavior-y' : 'auto' } ] , [ 'overscroll-y-contain' , { 'overscroll-behavior-y' : 'contain' } ] , [ 'overscroll-y-none' , { 'overscroll-behavior-y' : 'none' } ] , ] ; export const scrollBehaviors = [ [ 'scroll-auto' , { 'scroll-behavior' : 'auto' } ] , [ 'scroll-smooth' , { 'scroll-behavior' : 'smooth' } ] , ] ;