Skip to content

A set of utilities for validating css is limited to layout and not appearance

License

Notifications You must be signed in to change notification settings

studiosciences/layout-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

layout-css is a set of packages designed to make it simpler to validate css used to position components, ensuring that the consumer does not modify the appearance in an unsupportable way.

A simple library to provide lists of css properties to be used to validate css provided to components to ensure it does not modify the appearance of the component.

import {
  properties,
  propertiesExcluding,
  propertiesExcludingSize,
  propertiesExcludingWidth,
  propertiesExcludingHeight,
} from '@layout-css/properties';

A camel case version of the previous library.

import {
  properties,
  propertiesExcluding,
  propertiesExcludingSize,
  propertiesExcludingWidth,
  propertiesExcludingHeight,
} from '@layout-css/properties-camel';

A set of functions to ensure css does not include styles related to layout. This does require parsing the CSS with stylis. If styles are parsed in a different part of your stack, considering validating using one of the functions in layout-css.

import {
  isValidLayout,
  findInvalidLayoutProperties,
} from '@layout-css/validator';

An ESLint plugin to validate a styled-component's appearance is not modified during composition.

About

A set of utilities for validating css is limited to layout and not appearance

Resources

License

Stars

Watchers

Forks

Packages

No packages published