Skip to content

Instantly share code, notes, and snippets.

@erikjung
Created December 22, 2015 17:22
Show Gist options
  • Select an option

  • Save erikjung/2084b2c8da18e504c26c to your computer and use it in GitHub Desktop.

Select an option

Save erikjung/2084b2c8da18e504c26c to your computer and use it in GitHub Desktop.
Utility classes to force style inheritance
/** @define utilities */
/**
* Inherit box-related properties.
*/
.u-inheritBox {
box-sizing: inherit;
border: inherit;
background: inherit;
}
/**
* Inherit text-related properties.
*/
.u-inheritText {
font: inherit;
line-height: inherit;
letter-spacing: inherit;
text-align: inherit;
text-decoration: inherit;
text-transform: inherit;
color: inherit;
}
/**
* Inherit all properties.
*/
.u-inheritAll {
all: inherit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment