Skip to content

Commit

Permalink
Initial CSS property groups (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronccasanova committed Sep 3, 2022
1 parent 3d7ba40 commit 66bab94
Show file tree
Hide file tree
Showing 13 changed files with 1,240 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-socks-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'grouped-css-properties': patch
---

Initial CSS property groups
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions packages/grouped-css-properties/src/grouped-css-properties.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import { color } from './groups/color'
import { layout } from './groups/layout'
import { motion } from './groups/motion'
import { shape } from './groups/shape'
import { spacing } from './groups/spacing'
import { typography } from './groups/typography'

export const groupedCSSProperties = {
color,
layout,
motion,
shape,
spacing,
typography,
} as const

export type GroupedCSSProperties = typeof groupedCSSProperties
32 changes: 32 additions & 0 deletions packages/grouped-css-properties/src/groups/color.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export type Color = typeof color

export const color = [
'accent-color',
'background-color',
'background',
'border-block-end-color',
'border-block-start-color',
'border-bottom-color',
'border-bottom',
'border-color',
'border-left-color',
'border-left',
'border-right-color',
'border-right',
'border-top-color',
'border-top',
'border',
'box-shadow',
'caret-color',
'color',
'column-rule-color',
'fill',
'filter',
'opacity',
'outline-color',
'outline',
'stroke',
'text-decoration-color',
'text-decoration',
'text-shadow',
] as const
32 changes: 32 additions & 0 deletions packages/grouped-css-properties/src/groups/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ export const layout = [
// TODO: Investigate -epub- prefixed properties
// https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side
'-epub-caption-side',
'-ms-grid-column-align',
'-ms-grid-column-span',
'-ms-grid-column',
'-ms-grid-columns',
'-ms-grid-row-align',
'-ms-grid-row-span',
'-ms-grid-row',
'-ms-grid-rows',
'-webkit-grid-after',
'-webkit-grid-auto-columns',
'-webkit-grid-auto-flow',
'-webkit-grid-auto-rows',
'-webkit-grid-before',
'-webkit-grid-column',
'-webkit-grid-columns',
'-webkit-grid-end',
'-webkit-grid-row',
'-webkit-grid-rows',
'-webkit-grid-start',
'align-content',
'align-items',
'align-self',
'display',
Expand All @@ -15,16 +35,28 @@ export const layout = [
'flex',
'grid-area',
'grid-auto-columns',
'grid-auto-flow',
'grid-auto-rows',
'grid-column-end',
'grid-column-gap',
'grid-column-start',
'grid-column',
'grid-row-end',
'grid-row-gap',
'grid-row-start',
'grid-row',
'grid-template-areas',
'grid-template-columns',
'grid-template-rows',
'grid-template',
'grid',
'height',
'justify-content',
'justify-self',
'order',
'position',
'text-align',
'transform',
'width',
'z-index',
] as const
18 changes: 18 additions & 0 deletions packages/grouped-css-properties/src/groups/motion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export type Motion = typeof motion

export const motion = [
'animation-delay',
'animation-direction',
'animation-duration',
'animation-fill-mode',
'animation-iteration-count',
'animation-name',
'animation-play-state',
'animation-timing-function',
'animation',
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',
'transition',
] as const
9 changes: 9 additions & 0 deletions packages/grouped-css-properties/src/groups/shape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export type Shape = typeof shape

export const shape = [
'border-radius',
'border-top-left-radius',
'border-top-right-radius',
'border-bottom-left-radius',
'border-bottom-right-radius',
] as const
42 changes: 42 additions & 0 deletions packages/grouped-css-properties/src/groups/spacing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
export type Spacing = typeof spacing

export const spacing = [
'border-bottom-width',
'border-bottom',
'border-left-width',
'border-left',
'border-right-width',
'border-right',
'border-top-width',
'border-top',
'border-width',
'border',
'bottom',
'column-gap',
'gap',
'grid-gap',
'left',
'margin-block-end',
'margin-block-start',
'margin-bottom',
'margin-inline-end',
'margin-inline-start',
'margin-left',
'margin-right',
'margin-top',
'margin',
'max-height',
'max-width',
'min-height',
'min-width',
'padding-bottom',
'padding-left',
'padding-right',
'padding-top',
'padding',
'right',
'row-gap',
'scale',
'text-indent',
'top',
] as const
46 changes: 46 additions & 0 deletions packages/grouped-css-properties/src/groups/typography.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
export type Typography = typeof typography

export const typography = [
'-moz-font-feature-settings',
'-moz-font-language-override',
'-ms-font-feature-settings',
'-webkit-font-feature-settings',
'-webkit-font-kerning',
'-webkit-font-size-delta',
'-webkit-font-smoothing',
'-webkit-font-variant-ligatures',
'font-display',
'font-family',
'font-feature-settings',
'font-kerning',
'font-language-override',
'font-optical-sizing',
'font-palette',
'font-size-adjust',
'font-size',
'font-stretch',
'font-style',
'font-synthesis-small-caps',
'font-synthesis-style',
'font-synthesis-weight',
'font-synthesis',
'font-variant-alternates',
'font-variant-caps',
'font-variant-east-asian',
'font-variant-emoji',
'font-variant-ligatures',
'font-variant-numeric',
'font-variant-position',
'font-variant',
'font-variation-settings',
'font-weight',
'font',
'letter-spacing',
'line-height',
'text-decoration',
'text-transform',
'white-space',
'word-break',
'word-spacing',
'word-wrap',
] as const
27 changes: 27 additions & 0 deletions packages/grouped-css-properties/src/groups/un-categorized.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export type UnCategorized = typeof unCategorized

export const unCategorized = [
// TODO: Investigate -epub- prefixed properties
// https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side
'-epub-caption-side',
'-epub-hyphens',
'-epub-text-combine',
'-epub-text-emphasis-color',
'-epub-text-emphasis-style',
'-epub-text-emphasis',
'-epub-text-orientation',
'-epub-text-transform',
'-epub-word-break',
'-epub-writing-mode',
'-internal-text-autosizing-status',
'epub-caption-side',
'epub-hyphens',
'epub-text-combine',
'epub-text-emphasis-color',
'epub-text-emphasis-style',
'epub-text-emphasis',
'epub-text-orientation',
'epub-text-transform',
'epub-word-break',
'epub-writing-mode',
] as const

3 comments on commit 66bab94

@vercel
Copy link

@vercel vercel bot commented on 66bab94 Sep 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 66bab94 Sep 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

aacc-next-ts – ./recipes/next-ts

aacc-next-ts-git-main-aaronccasanova-gmailcom.vercel.app
aacc-next-ts.vercel.app
aacc-next-ts-aaronccasanova-gmailcom.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 66bab94 Sep 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

aacc-next-ts-styled-comps – ./recipes/next-ts-styled-comps

aacc-next-ts-styled-comps-aaronccasanova-gmailcom.vercel.app
aacc-next-ts-styled-comps-git-main-aaronccasanova-gmailcom.vercel.app
aacc-next-ts-styled-comps.vercel.app

Please sign in to comment.