diff --git a/addon/__tests__/emmet/emmet.dev.test.js b/addon/__tests__/emmet/emmet.dev.test.js new file mode 100644 index 00000000..15107527 --- /dev/null +++ b/addon/__tests__/emmet/emmet.dev.test.js @@ -0,0 +1,5 @@ +'use strict'; + +process.env.NODE_ENV = 'development'; + +require('./emmet.test'); diff --git a/addon/__tests__/emmet/emmet.server.dev.test.js b/addon/__tests__/emmet/emmet.server.dev.test.js new file mode 100644 index 00000000..55378881 --- /dev/null +++ b/addon/__tests__/emmet/emmet.server.dev.test.js @@ -0,0 +1,8 @@ +/** @jest-environment node */ + +/* eslint-disable */ +'use strict'; + +process.env.NODE_ENV = 'development'; + +require('./emmet.test'); diff --git a/addon/__tests__/emmet/emmet.server.test.js b/addon/__tests__/emmet/emmet.server.test.js new file mode 100644 index 00000000..49d0b8b4 --- /dev/null +++ b/addon/__tests__/emmet/emmet.server.test.js @@ -0,0 +1,6 @@ +/** @jest-environment node */ + +/* eslint-disable */ +'use strict'; + +require('./emmet.test'); diff --git a/addon/__tests__/emmet/emmet.test.js b/addon/__tests__/emmet/emmet.test.js new file mode 100644 index 00000000..f5aaee2e --- /dev/null +++ b/addon/__tests__/emmet/emmet.test.js @@ -0,0 +1,219 @@ +/* eslint-disable */ +'use strict'; + +var create = require('../../../').create; +var emmet = require('../../emmet').emmet; +var addonEmmet = require('../../emmet').addon; + +it('emmet has proper key value pairs', function() { + expect(emmet).toEqual({ + // Visual Formatting; + pos: 'position', + t: 'top', + r: 'right', + b: 'bottom', + l: 'left', + z: 'z-index', + fl: 'float', + cl: 'clear', + d: 'display', + v: 'visibility', + ov: 'overflow', + ovx: 'overflow-x', + ovy: 'overflow-y', + ovs: 'overflow-style', + zm: 'zoom', + cp: 'clip', + rsz: 'resize', + cur: 'cursor', + // Margin & Padding; + m: 'margin', + mt: 'margin-top', + mr: 'margin-right', + mb: 'margin-bottom', + ml: 'margin-left', + p: 'padding', + pt: 'padding-top', + pr: 'padding-right', + pb: 'padding-bottom', + pl: 'padding-left', + // Box Sizing; + bxz: 'box-sizing', + bxsh: 'box-shadow', + w: 'width', + h: 'height', + maw: 'max-width', + mah: 'max-height', + miw: 'min-width', + mih: 'min-height', + // Font; + f: 'font', + fw: 'font-weight', + fs: 'font-style', + fv: 'font-variant', + fz: 'font-size', + ff: 'font-family', + fsm: 'font-smooth', + fst: 'font-stretch', + // Text; + va: 'vertical-align', + ta: 'text-align', + td: 'text-decoration', + te: 'text-emphasis', + ti: 'text-indent', + tj: 'text-justify', + tt: 'text-transform', + tsh: 'text-shadow', + lh: 'line-height', + lts: 'letter-spacing', + whs: 'white-space', + wob: 'word-break', + wos: 'word-spacing', + wow: 'word-wrap', + // Background; + bg: 'background', + bgc: 'background-color', + bgi: 'background-image', + bgr: 'background-repeat', + bga: 'background-attachment', + bgp: 'background-position', + bgpx: 'background-position-x', + bgpy: 'background-position-y', + bgcp: 'background-clip', + bgo: 'background-origin', + bgsz: 'background-size', + // Color; + c: 'color', + op: 'opacity', + // Generated Content; + ct: 'content', + q: 'quotes', + coi: 'counter-increment', + cor: 'counter-reset', + // Outline; + ol: 'outline', + olo: 'outline-offset', + olw: 'outline-width', + ols: 'outline-style', + olc: 'outline-color', + // Tables; + tbl: 'table-layout', + cps: 'caption-side', + ec: 'empty-cells', + // Border; + bd: 'border', + bdcl: 'border-collapse', + bdc: 'border-color', + bdi: 'border-image', + bds: 'border-style', + bdw: 'border-width', + bdt: 'border-top', + bdtw: 'border-top-width', + bdts: 'border-top-style', + bdtc: 'border-top-color', + bdr: 'border-right', + bdrw: 'border-right-width', + bdrst: 'border-right-style', + bdrc: 'border-right-color', + bdb: 'border-bottom', + bdbw: 'border-bottom-width', + bdbs: 'border-bottom-style', + bdbc: 'border-bottom-color', + bdl: 'border-left', + bdlw: 'border-left-width', + bdls: 'border-left-style', + bdlc: 'border-left-color', + bdrs: 'border-radius', + bdtlrs: 'border-top-left-radius', + bdtrrs: 'border-top-right-radius', + bdbrrs: 'border-bottom-right-radius', + bdblrs: 'border-bottom-left-radius', + // Lists; + lis: 'list-style', + lisp: 'list-style-position', + list: 'list-style-type', + lisi: 'list-style-image', + // Flexbox Parent/Child Properties; + ac: 'align-content', + ai: 'align-items', + as: 'align-self', + jc: 'justify-content', + fx: 'flex', + fxb: 'flex-basis', + fxd: 'flex-direction', + fxf: 'flex-flow', + fxg: 'flex-grow', + fxs: 'flex-shrink', + fxw: 'flex-wrap', + ord: 'order', + // CSS Grid Layout; + colm: 'columns', + colmc: 'column-count', + colmf: 'column-fill', + colmg: 'column-gap', + colmr: 'column-rule', + colmrc: 'column-rule-color', + colmrs: 'column-rule-style', + colmrw: 'column-rule-width', + colms: 'column-span', + colmw: 'column-width', + // CSS Transitions; + trf: 'transform', + trfo: 'transform-origin', + trfs: 'transform-style', + trs: 'transition', + trsde: 'transition-delay', + trsdu: 'transition-duration', + trsp: 'transition-property', + trstf: 'transition-timing-function', + // Others; + bfv: 'backface-visibility', + tov: 'text-overflow', + mar: 'max-resolution', + mir: 'min-resolution', + ori: 'orientation', + us: 'user-select', + }); +}); + +function createNano(config) { + var nano = create(config); + addonEmmet(nano); + return nano; +} + +describe('emmet', function() { + it('installs without crashing', function() { + var nano = createNano(); + }); + + it('passes through standard properties', function() { + var nano = createNano(); + + nano.putRaw = jest.fn(); + + nano.put('.foo', { + color: 'red', + }); + + expect(nano.putRaw.mock.calls[0][0].includes('color:red')).toBeTruthy(); + }); + + it('expands the abbreviations', function() { + var nano = createNano(); + + nano.putRaw = jest.fn(); + + nano.put('.bar', { + c: 'blue', + ta: 'center', + ord: '1', + mah: '200px', + }); + + expect(nano.putRaw.mock.calls[0][0].includes('color:blue')).toBeTruthy(); + expect(nano.putRaw.mock.calls[0][0].includes('text-align:center')).toBeTruthy(); + expect(nano.putRaw.mock.calls[0][0].includes('order:1')).toBeTruthy(); + expect(nano.putRaw.mock.calls[0][0].includes('max-height:200px')).toBeTruthy(); + }); +}); diff --git a/addon/emmet.js b/addon/emmet.js new file mode 100644 index 00000000..b64ef949 --- /dev/null +++ b/addon/emmet.js @@ -0,0 +1,177 @@ +'use strict'; + +var emmet = (exports.emmet = { + // Visual Formatting; + pos: 'position', + t: 'top', + r: 'right', + b: 'bottom', + l: 'left', + z: 'z-index', + fl: 'float', + cl: 'clear', + d: 'display', + v: 'visibility', + ov: 'overflow', + ovx: 'overflow-x', + ovy: 'overflow-y', + ovs: 'overflow-style', + zm: 'zoom', + cp: 'clip', + rsz: 'resize', + cur: 'cursor', + // Margin & Padding; + m: 'margin', + mt: 'margin-top', + mr: 'margin-right', + mb: 'margin-bottom', + ml: 'margin-left', + p: 'padding', + pt: 'padding-top', + pr: 'padding-right', + pb: 'padding-bottom', + pl: 'padding-left', + // Box Sizing; + bxz: 'box-sizing', + bxsh: 'box-shadow', + w: 'width', + h: 'height', + maw: 'max-width', + mah: 'max-height', + miw: 'min-width', + mih: 'min-height', + // Font; + f: 'font', + fw: 'font-weight', + fs: 'font-style', + fv: 'font-variant', + fz: 'font-size', + ff: 'font-family', + fsm: 'font-smooth', + fst: 'font-stretch', + // Text; + va: 'vertical-align', + ta: 'text-align', + td: 'text-decoration', + te: 'text-emphasis', + ti: 'text-indent', + tj: 'text-justify', + tt: 'text-transform', + tsh: 'text-shadow', + lh: 'line-height', + lts: 'letter-spacing', + whs: 'white-space', + wob: 'word-break', + wos: 'word-spacing', + wow: 'word-wrap', + // Background; + bg: 'background', + bgc: 'background-color', + bgi: 'background-image', + bgr: 'background-repeat', + bga: 'background-attachment', + bgp: 'background-position', + bgpx: 'background-position-x', + bgpy: 'background-position-y', + bgcp: 'background-clip', + bgo: 'background-origin', + bgsz: 'background-size', + // Color; + c: 'color', + op: 'opacity', + // Generated Content; + ct: 'content', + q: 'quotes', + coi: 'counter-increment', + cor: 'counter-reset', + // Outline; + ol: 'outline', + olo: 'outline-offset', + olw: 'outline-width', + ols: 'outline-style', + olc: 'outline-color', + // Tables; + tbl: 'table-layout', + cps: 'caption-side', + ec: 'empty-cells', + // Border; + bd: 'border', + bdcl: 'border-collapse', + bdc: 'border-color', + bdi: 'border-image', + bds: 'border-style', + bdw: 'border-width', + bdt: 'border-top', + bdtw: 'border-top-width', + bdts: 'border-top-style', + bdtc: 'border-top-color', + bdr: 'border-right', + bdrw: 'border-right-width', + bdrst: 'border-right-style', + bdrc: 'border-right-color', + bdb: 'border-bottom', + bdbw: 'border-bottom-width', + bdbs: 'border-bottom-style', + bdbc: 'border-bottom-color', + bdl: 'border-left', + bdlw: 'border-left-width', + bdls: 'border-left-style', + bdlc: 'border-left-color', + bdrs: 'border-radius', + bdtlrs: 'border-top-left-radius', + bdtrrs: 'border-top-right-radius', + bdbrrs: 'border-bottom-right-radius', + bdblrs: 'border-bottom-left-radius', + // Lists; + lis: 'list-style', + lisp: 'list-style-position', + list: 'list-style-type', + lisi: 'list-style-image', + // Flexbox Parent/Child Properties; + ac: 'align-content', + ai: 'align-items', + as: 'align-self', + jc: 'justify-content', + fx: 'flex', + fxb: 'flex-basis', + fxd: 'flex-direction', + fxf: 'flex-flow', + fxg: 'flex-grow', + fxs: 'flex-shrink', + fxw: 'flex-wrap', + ord: 'order', + // CSS Grid Layout; + colm: 'columns', + colmc: 'column-count', + colmf: 'column-fill', + colmg: 'column-gap', + colmr: 'column-rule', + colmrc: 'column-rule-color', + colmrs: 'column-rule-style', + colmrw: 'column-rule-width', + colms: 'column-span', + colmw: 'column-width', + // CSS Transitions; + trf: 'transform', + trfo: 'transform-origin', + trfs: 'transform-style', + trs: 'transition', + trsde: 'transition-delay', + trsdu: 'transition-duration', + trsp: 'transition-property', + trstf: 'transition-timing-function', + // Others; + bfv: 'backface-visibility', + tov: 'text-overflow', + mar: 'max-resolution', + mir: 'min-resolution', + ori: 'orientation', + us: 'user-select', +}); + +exports.addon = function(renderer) { + var originalDecl = renderer.decl; + renderer.decl = function(key, value) { + return originalDecl(emmet[key] || key, value); + }; +}; diff --git a/index.d.ts b/index.d.ts index 8b9be896..326c991c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,6 +4,7 @@ import {UnitsAddon} from './types/addon/units'; import {DruleAddon} from './types/addon/drule'; import {SheetAddon} from './types/addon/sheet'; import {AtomsAddon} from './types/addon/atoms'; +import {EmmetAddon} from './types/addon/emmet'; import {SheetPreset} from './types/preset/sheet'; import {KeyframesAddon} from './types/addon/keyframes'; @@ -35,6 +36,10 @@ declare module 'nano-css/addon/atoms' { export const addon: AtomsAddon; } +declare module 'nano-css/addon/emmet' { + export const addon: EmmetAddon; +} + declare module 'nano-css/addon/keyframes' { export const addon: KeyframesAddon; } diff --git a/types/addon/emmet.d.ts b/types/addon/emmet.d.ts new file mode 100644 index 00000000..202ab53e --- /dev/null +++ b/types/addon/emmet.d.ts @@ -0,0 +1,614 @@ +import * as CSS from 'csstype'; +import {NanoRenderer} from '../nano'; + +type TLength = string | number; + +export interface Emmet { + // Visual Formatting; // + /** + * Short for `position` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + pos?: CSS.PositionProperty; + /** + * Short for `top` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + t?: CSS.TopProperty; + /** + * Short for `right` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + r?: CSS.RightProperty; + /** + * Short for `bottom` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + b?: CSS.BottomProperty; + /** + * Short for `left` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + l?: CSS.LeftProperty; + /** + * Short for `z-index` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + z?: CSS.ZIndexProperty; + /** + * Short for `float` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fl?: CSS.FloatProperty; + /** + * Short for `clear` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + cl?: CSS.ClearProperty; + /** + * Short for `display` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + d?: CSS.DisplayProperty; + /** + * Short for `visibility` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + v?: CSS.VisibilityProperty; + /** + * Short for `overflow` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ov?: CSS.OverflowProperty; + /** + * Short for `overflow-x` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ovx?: CSS.OverflowXProperty; + /** + * Short for `overflow-y` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ovy?: CSS.OverflowYProperty; + /** + * Short for `overflow-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ovs?: CSS.MsOverflowStyleProperty; + /** + * Short for `zoom` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + zm?: CSS.ZoomProperty; + /** + * Short for `clip` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + cp?: CSS.ClipProperty; + /** + * Short for `resize` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + rsz?: CSS.ResizeProperty; + /** + * Short for `cursor` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + cur?: CSS.CursorProperty; + // Margin & Padding; // + /** + * Short for `margin` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + m?: CSS.MarginProperty; + /** + * Short for `margin-top` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + mt?: CSS.MarginTopProperty; + /** + * Short for `margin-right` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + mr?: CSS.MarginRightProperty; + /** + * Short for `margin-bottom` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + mb?: CSS.MarginBottomProperty; + /** + * Short for `margin-left` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ml?: CSS.MarginLeftProperty; + /** + * Short for `padding` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + p?: CSS.PaddingProperty; + /** + * Short for `paddin-top` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + pt?: CSS.PaddingTopProperty; + /** + * Short for `padding-right` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + pr?: CSS.PaddingRightProperty; + /** + * Short for `padding-bottom` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + pb?: CSS.PaddingBottomProperty; + /** + * Short for `padding-left` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + pl?: CSS.PaddingLeftProperty; + // Box Sizing; // + /** + * Short for `box-sizing` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bxz?: CSS.BoxSizingProperty; + /** + * Short for `box-shadow` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bxsh?: CSS.BoxShadowProperty; + /** + * Short for `width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + w?: CSS.WidthProperty; + /** + * Short for `height` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + h?: CSS.HeightProperty; + /** + * Short for `max-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + maw?: CSS.MaxWidthProperty; + /** + * Short for `max-height` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + mah?: CSS.MaxHeightProperty; + /** + * Short for `min-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + miw?: CSS.MinWidthProperty; + /** + * Short for `min-height` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + mih?: CSS.MinHeightProperty; + // Font; // + /** + * Short for `font` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + f?: CSS.FontProperty; + /** + * Short for `font-weight` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fw?: CSS.FontWeightProperty; + /** + * Short for `font-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fs?: CSS.FontStyleProperty; + /** + * Short for `font-variant` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fv?: CSS.FontVariantProperty; + /** + * Short for `font-size` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fz?: CSS.FontSizeProperty; + /** + * Short for `font-family` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ff?: CSS.FontFamilyProperty; + /** + * Short for `font-stretch` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fst?: CSS.FontStretchProperty; + + // Text; // + /** + * Short for `vertical-align` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + va?: CSS.VerticalAlignProperty; + /** + * Short for `text-align` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ta?: CSS.TextAlignProperty; + /** + * Short for `text-decoration` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + td?: CSS.TextDecorationProperty; + /** + * Short for `text-emphasis` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + te?: CSS.TextEmphasisProperty; + /** + * Short for `text-indent` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ti?: CSS.TextIndentProperty; + /** + * Short for `text-justify` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + tj?: CSS.TextJustifyProperty; + /** + * Short for `text-transform` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + tt?: CSS.TextTransformProperty; + /** + * Short for `text-shadow` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + tsh?: CSS.TextShadowProperty; + /** + * Short for `line-height` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + lh?: CSS.LineHeightProperty; + /** + * Short for `letter-spacing` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + lts?: CSS.LetterSpacingProperty; + /** + * Short for `white-space` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + whs?: CSS.WhiteSpaceProperty; + /** + * Short for `word-break` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + wob?: CSS.WordBreakProperty; + /** + * Short for `word-spacing` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + wos?: CSS.WordSpacingProperty; + /** + * Short for `word-wrap` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + wow?: CSS.WordWrapProperty; + // Background; // + /** + * Short for `background` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bg?: CSS.BackgroundProperty; + /** + * Short for `background-color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgc?: CSS.BackgroundColorProperty; + /** + * Short for `background-image` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgi?: CSS.BackgroundImageProperty; + /** + * Short for `background-repeat` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgr?: CSS.BackgroundRepeatProperty; + /** + * Short for `background-attachment` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bga?: CSS.BackgroundAttachmentProperty; + /** + * Short for `background-position` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgp?: CSS.BackgroundPositionProperty; + /** + * Short for `background-position-x` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgpx?: CSS.BackgroundPositionXProperty; + /** + * Short for `background-position-y` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgpy?: CSS.BackgroundPositionYProperty; + /** + * Short for `background-clip` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgcp?: CSS.BackgroundClipProperty; + /** + * Short for `background-origin` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgo?: CSS.BackgroundOriginProperty; + /** + * Short for `background-size` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bgsz?: CSS.BackgroundSizeProperty; + // Color; // + /** + * Short for `color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + c?: CSS.ColorProperty; + /** + * Short for `opacity` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + op?: CSS.GlobalsNumber; + // Generated Content; // + /** + * Short for `content` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ct?: CSS.ContentProperty; + /** + * Short for `quotes` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + q?: CSS.QuotesProperty; + /** + * Short for `counter-increment` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + coi?: CSS.CounterIncrementProperty; + /** + * Short for `counter-reset` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + cor?: CSS.CounterResetProperty; + // Outline; // + /** + * Short for `outline` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ol?: CSS.OutlineProperty; + /** + * Short for `outline-offset` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + olo?: CSS.OutlineOffsetProperty; + /** + * Short for `outline-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + olw?: CSS.OutlineWidthProperty; + /** + * Short for `outline-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ols?: CSS.OutlineStyleProperty; + /** + * Short for `outline-color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + olc?: CSS.OutlineColorProperty; + // Tables; // + /** + * Short for `table-layout` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + tbl?: CSS.TableLayoutProperty; + /** + * Short for `caption-side` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + cps?: CSS.CaptionSideProperty; + /** + * Short for `empty-cells` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ec?: CSS.EmptyCellsProperty; + // Border; + /** + * Short for `border` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bd?: CSS.BorderProperty; + /** + * Short for `position` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdcl?: CSS.BorderCollapseProperty; + /** + * Short for `position` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdc?: CSS.BorderColorProperty; + /** + * Short for `position` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdi?: CSS.BorderImageProperty; + /** + * Short for `border-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bds?: CSS.BorderStyleProperty; + /** + * Short for `border-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdw?: CSS.BorderWidthProperty; + /** + * Short for `border-top` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdt?: CSS.BorderTopProperty; + /** + * Short for `border-top-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdtw?: CSS.BorderTopWidthProperty; + /** + * Short for `border-top-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdts?: CSS.BorderTopStyleProperty; + /** + * Short for `border-top-color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdtc?: CSS.BorderTopColorProperty; + /** + * Short for `border-right` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdr?: CSS.BorderRightProperty; + /** + * Short for `border-right-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdrw?: CSS.BorderRightWidthProperty; + /** + * Short for `border-right-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdrst?: CSS.BorderRightStyleProperty; + /** + * Short for `border-right-color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdrc?: CSS.BorderRightColorProperty; + /** + * Short for `border-bottom` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdb?: CSS.BorderBottomProperty; + /** + * Short for `border-bottom-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdbw?: CSS.BorderBottomWidthProperty; + /** + * Short for `border-bottom-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdbs?: CSS.BorderBottomStyleProperty; + /** + * Short for `border-bottom-color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdbc?: CSS.BorderBottomColorProperty; + /** + * Short for `border-left` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdl?: CSS.BorderLeftProperty; + /** + * Short for `border-left-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdlw?: CSS.BorderLeftWidthProperty; + /** + * Short for `border-left-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdls?: CSS.BorderLeftStyleProperty; + /** + * Short for `border-left-color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdlc?: CSS.BorderLeftColorProperty; + /** + * Short for `border-radius` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdrs?: CSS.BorderRadiusProperty; + /** + * Short for `border-top-left-radius` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdtlrs?: CSS.BorderTopLeftRadiusProperty; + /** + * Short for `border-top-right-radius` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdtrrs?: CSS.BorderTopRightRadiusProperty; + /** + * Short for `border-bottom-right-radius` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdbrrs?: CSS.BorderBottomRightRadiusProperty; + /** + * Short for `border-bottom-left-radius` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bdblrs?: CSS.BorderBottomLeftRadiusProperty; + // Lists; // + /** + * Short for `list-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + lis?: CSS.ListStyleProperty; + /** + * Short for `list-style-position` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + lisp?: CSS.ListStylePositionProperty; + /** + * Short for `list-style-type` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + list?: CSS.ListStyleTypeProperty; + /** + * Short for `list-style-image` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + lisi?: CSS.ListStyleImageProperty; + // Flexbox Parent/Child Properties; // + /** + * Short for `align-content` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ac?: CSS.AlignContentProperty; + /** + * Short for `align-items` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ai?: CSS.AlignItemsProperty; + /** + * Short for `align-self` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + as?: CSS.AlignSelfProperty; + /** + * Short for `justify-content` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + jc?: CSS.JustifyContentProperty; + /** + * Short for `flex` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fx?: CSS.FlexProperty; + /** + * Short for `flex-basis` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fxb?: CSS.FlexBasisProperty; + /** + * Short for `flex-direction` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fxd?: CSS.FlexDirectionProperty; + /** + * Short for `flex-flow` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fxf?: CSS.FlexFlowProperty; + /** + * Short for `flex-grow` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fxg?: CSS.GlobalsNumber; + /** + * Short for `position` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fxs?: CSS.GlobalsNumber; + /** + * Short for `flex-wrap` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + fxw?: CSS.FlexWrapProperty; + /** + * Short for `order` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ord?: CSS.GlobalsNumber; + // CSS Grid Layout; // + /** + * Short for `columns` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colm?: CSS.ColumnsProperty; + /** + * Short for `column-count` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmc?: CSS.ColumnCountProperty; + /** + * Short for `column-fill` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmf?: CSS.ColumnFillProperty; + /** + * Short for `column-gap` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmg?: CSS.ColumnGapProperty; + /** + * Short for `column-rule` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmr?: CSS.ColumnRuleProperty; + /** + * Short for `column-rule-color` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmrc?: CSS.ColumnRuleColorProperty; + /** + * Short for `column-rule-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmrs?: CSS.ColumnRuleStyleProperty; + /** + * Short for `column-rule-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmrw?: CSS.ColumnRuleWidthProperty; + /** + * Short for `column-span` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colms?: CSS.ColumnSpanProperty; + /** + * Short for `column-width` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + colmw?: CSS.ColumnWidthProperty; + // CSS Transitions; // + /** + * Short for `transform` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trf?: CSS.TransformProperty; + /** + * Short for `transform-origin` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trfo?: CSS.TransformOriginProperty; + /** + * Short for `transform-style` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trfs?: CSS.TransformStyleProperty; + /** + * Short for `transition` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trs?: CSS.TransitionProperty; + /** + * Short for `transition-delay` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trsde?: CSS.GlobalsString; + /** + * Short for `transition-duration` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trsdu?: CSS.GlobalsString; + /** + * Short for `transition-property` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trsp?: CSS.TransitionPropertyProperty; + /** + * Short for `transition-timing-function` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + trstf?: CSS.TransitionTimingFunctionProperty; + // Others; // + /** + * Short for `backface-visibility` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + bfv?: CSS.BackfaceVisibilityProperty; + /** + * Short for `text-overflow` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + tov?: CSS.TextOverflowProperty; + /** + * Short for `orientation` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + ori?: CSS.ViewportOrientationProperty; + /** + * Short for `user-select` property. Requires [`atoms` addon](https://github.com/streamich/nano-css/blob/master/docs/atoms.md). + */ + us?: CSS.UserSelectProperty; +} + +export type EmmetAddon = (nano: T) => T;