An addition to Eric Meyer's awesome CSS Reset.
PCR uses SASS to compile a custom reset based on Eric Meyer's reset with a few additions.
PCR requires SASS. If SASS is not already installed there are installation instructions here
To get the demo working locally.
- Clone the repo.
$ git clone git@github.com:pebblecode/PCR.git - Run
$ sass --watch sass/to tell sass to auto compile your css as you make changes. - Edit variables at the top of
/sass/style.scss(See bellow for a list of variables.) - Open
index.html. Refresh to see changes to your reset as they are complied.
To use PCR in your own project.
- Copy
_PCR.scssinto your projects sass directory. - Add the line
@import "PCR";to your main .scss file. - PCR is now ready to go. Without specifying any variables PCR will compile Eric Meyer's css reset with no additions.
- Add variables. To enable the PCR additions you need to add some variables to your .scss file, above
@import "PCR";
The following variables can be added to your .scss file above @import "PCR";, to give your reset additional rules.
Set to 'true' to add the following code to your reset:
/* 'true' */
ul, ol {
list-style: none;
}Set to 'none' or 'hover' to add the following code to your reset:
/* 'none' */
a:link{
text-decoration: none;
}
/* 'hover' */
a:link{
text-decoration: none;
}
a:hover{
text-decoration: underline;
}Set a color to add the following code to your reset:
/* 'yellow' */
ins{
background-color: yellow;
}Set an outline property to add the following code to your reset:
/* '1px dotted grey' */
:focus {
outline: 1px dotted grey;
}Set to 'true' to add the following code to your reset:
/* 'true' */
abbr[title], dfn[title] {
border-bottom: 1px dotted;
cursor: help;
}Set to 'true' to add the following code to your reset:
/* 'true' */
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #cccccc;
margin: 1em 0;
padding: 0;
}Big thanks to Eric Meyer And html5doctor.com/