Skip to content

Commit

Permalink
Update defaults; remove ui/theme color
Browse files Browse the repository at this point in the history
  • Loading branch information
colepeters committed Jul 10, 2024
1 parent 8db2f8a commit 5155b1c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 193 deletions.
2 changes: 1 addition & 1 deletion v7/properties/border-radius.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default function borderRadius(state = {}) {
const { config = {} } = state
const { borders = {} } = config
const { radii = [2, 8, 16, 9999] } = borders
const { radii = [2, 4, 8, 9999] } = borders

let output = ''

Expand Down
5 changes: 4 additions & 1 deletion v7/properties/color-spots.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
export default function colorSpots(state = {}) {
const { config = {} } = state
const { color = {} } = config
const { spots = { /* DEFAULTS HERE */ } } = color
const { spots = {
magenta: '#ff0095',
p3magenta: 'color(display-p3 1 0 0.58)',
} } = color

let output = ''

Expand Down
27 changes: 0 additions & 27 deletions v7/properties/color-ui.mjs

This file was deleted.

6 changes: 5 additions & 1 deletion v7/properties/fonts.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
export default function fonts(state = {}) {
const { config = {} } = state
const { fonts = { /* DEFAULTS HERE */ } } = config
const { fonts = {
sans: 'system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif',
serif: 'Georgia, Cambria, Times New Roman, Times, serif',
mono: 'Source Code Pro, Roboto Mono, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace'
} } = config

let output = ''

Expand Down
4 changes: 2 additions & 2 deletions v7/properties/space-scale.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { generateSpaceScaleProperties } from '../lib/scales.mjs'
import { generateSpaceScaleProperties, defaultConfig } from '../lib/scales.mjs'

export default function spaceScaleProperties(state = {}) {
const { config = {} } = state
const { spaceScale = null } = config
const { spaceScale = defaultConfig } = config

let output = ''

Expand Down
144 changes: 0 additions & 144 deletions v7/properties/theme-color.mjs

This file was deleted.

4 changes: 2 additions & 2 deletions v7/properties/type-scale.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { generateTypeScaleProperties } from '../lib/scales.mjs'
import { generateTypeScaleProperties, defaultConfig } from '../lib/scales.mjs'

export default function typeScaleProperties(state = {}) {
const { config = {} } = state
const { typeScale = null } = config
const { typeScale = defaultConfig } = config

let output = ''

Expand Down
16 changes: 1 addition & 15 deletions v7/test/fixtures/styleguide.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ export default {
spots: {
rebeccaPurple: '#663399',
},
ui: {
accent: '#00f',
background: '#fff',
body: '#222',
error: '#f00',
},
},
customProperties: {
preferredInlineSize: '52ch',
Expand All @@ -42,14 +36,6 @@ export default {
scaleMin: 'minor-third',
scaleMax: 'perfect-fourth',
},
typeScale: {
steps: 3,
viewportMin: 320,
viewportMax: 1500,
baseMin: 16,
baseMax: 24,
scaleMin: 'minor-third',
scaleMax: 'perfect-fourth',
},
typeScale: false,
}

0 comments on commit 5155b1c

Please sign in to comment.