Layout scaffolding for Web apps.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
413 B

  1. import {CSSObject} from 'styled-components'
  2. import config from '../config.json'
  3. export const minWidthFactor = (factor: number) => (styles: CSSObject) => ({
  4. [`@media (min-width: ${config['base-width'] * factor}px)`]: styles,
  5. })
  6. export const applyBackgroundColor = () => ({
  7. backgroundColor: 'var(--color-bg, white)',
  8. '@media (prefers-color-scheme: dark)': {
  9. backgroundColor: 'var(--color-bg, black)',
  10. },
  11. })