Skip to content

lucianonooijen/styled-components-style-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Styled Components Style Utils

Several style utils for styled components. SASS mixins converted to JS functions in ES6.

Installation

To install, run

yarn add styled-components-style-utils

or

npm i styled-components-style-utils

Import

To import methods, use

import { method1, method } from 'styled-components-style-utils';

or

const { method1, method } = require('styled-components-style-utils');

Usage

Method call Arguments What the method does
reset() - Will return CSS for CSS reset
debug() - Will add CSS debug mode
center(type) type(string): both|vertical|horizontal Will add flexbox CSS to center children vertically, horizontally, or both
Truncate() - Will add truncate CSS for text, width must be set separately

Why

I made this package because I often use these utils, and wanted them to store somewhere centrally, and open for others to use.

License

MIT

About

Styling utilities for Styled Components, including CSS debug, CSS reset, and several more

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors