Skip to content

Commit

Permalink
added fallback for all rem units
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmorris committed Apr 13, 2012
1 parent 3cfd00e commit 95d8d98
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/assets/stylesheets/_defaults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ h1, h2, h3, h4, h5, h6 {
/* Use a .box to create a padded box inside a column. */
.box {
background: #eee;
margin-bottom: 1em;
margin-bottom: 1rem;
padding: 1em;
padding: 1rem;
}

Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/_flashes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ div.error, div.notice, div.success, #flash_failure, #flash_success, #flash_notic
-moz-border-radius: .5rem;
-webkit-border-radius: .5rem;
border-radius: .5rem;
margin-bottom: .75em;
margin-bottom: .75rem;
padding: .75em;
padding: .75rem;
}

Expand Down
20 changes: 19 additions & 1 deletion app/assets/stylesheets/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ input[type="submit"]::-moz-focus-inner {

form ol {
list-style: none;
margin: 0 0 .75em 0;
margin: 0 0 .75rem 0;
}

Expand All @@ -20,12 +21,14 @@ form ol ol {

form ol li {
list-style-position: outside;
margin: 0 0 .75em 0;
margin: 0 0 .75rem 0;
}

/*list-style-position fixes IE label margin bug*/
form ol ol li {
list-style-position: outside;
margin: 0 0 .25em 0;
margin: 0 0 .25rem 0;
}

Expand All @@ -40,6 +43,7 @@ p.inline-errors {
form ol li.file {
background: #e1e1e1;
border: 1px solid #c8c8c8;
padding: .75em;
padding: .75rem;
}

Expand All @@ -66,15 +70,19 @@ a.cancel {

.inline-hints {
color: #666;
font-size: .75em;
font-size: .75rem;
margin-bottom: .25em;
margin-bottom: .25rem;
}

/* Fieldsets */
fieldset {
background: #f1f1f1;
border: 1px solid #e3e3e3;
margin: 0 0 1em 0;
margin: 0 0 1rem 0;
padding: 1rem 1rem .75em 1em;
padding: 1rem 1rem .75rem 1rem;
}

Expand All @@ -86,7 +94,10 @@ fieldset fieldset, fieldset fieldset fieldset {
legend {
font-weight: bold;
}
.ie6 legend, .ie7 legend { margin-left: .5rem; }
.ie6 legend, .ie7 legend {
margin-left: .5em;
margin-left: .5rem;
}

fieldset.buttons {
background: inherit;
Expand Down Expand Up @@ -120,6 +131,7 @@ input[type="time"],
input[type="url"],
input[type="week"] {
font-size: inherit;
padding: .25em;
padding: .25rem;
}
.ie6 input {
Expand All @@ -132,6 +144,7 @@ input[disabled='disabled'] {
}

input[type="checkbox"] {
margin: 0 .25em 0 0;
margin: 0 .25rem 0 0;
position: relative;
vertical-align: middle;
Expand All @@ -141,6 +154,7 @@ input[type="checkbox"] {
}

input[type="radio"] {
margin: 0 .25em 0 0;
margin: 0 .25rem 0 0;
position: relative;
vertical-align: middle;
Expand All @@ -159,17 +173,21 @@ input[type="radio"] {
/* Textareas */
textarea {
font-size: inherit;
margin: 0 .5em .5em 0;
margin: 0 .5rem .5rem 0;
padding: .5em;
padding: .5rem;
overflow: auto;
}

/* Select fields */
fieldset .select select {
font-size: .75em;
font-size: .75rem;
}

optgroup {
margin: 0 0 .5em 0;
margin: 0 0 .5rem 0;
}

Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/_lists.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

ul, ol {
list-style-position: inside;
margin-bottom: 1em;
margin-bottom: 1rem;
}

Expand All @@ -15,11 +16,13 @@ ol {

dl {
line-height: 1.4em;
margin-bottom: 1em;
margin-bottom: 1rem;
}

dl dt {
font-weight: bold;
margin-top: .5em;
margin-top: .5rem;
}

Expand All @@ -28,6 +31,7 @@ dl dd {
}

dd {
margin-left: .5em;
margin-left: .5rem;
}

Expand All @@ -36,5 +40,6 @@ li {
}

ol ol, ol ul, ul ul, ul ol {
margin-left: .75em;
margin-left: .75rem;
}
4 changes: 4 additions & 0 deletions app/assets/stylesheets/_tables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Tables */

table {
margin-bottom: 1.5em;
margin-bottom: 1.5rem;
width: 100%;
}
Expand All @@ -16,12 +17,15 @@ td {
}

caption, th, td {
padding: .25em .75em .25em 0;
padding: .25rem .75rem .25rem 0;
}

caption {
background: #f1f1f1;
margin-bottom: .75em;
margin-bottom: .75rem;
padding: .75em 0;
padding: .75rem 0;
}

Expand Down
16 changes: 15 additions & 1 deletion app/assets/stylesheets/_type.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,38 @@ h1, h2, h3, h4, h5, h6 {
}

h1 {
font-size: 1.75em;
font-size: 1.75rem;
}

h2 {
font-size: 1.5em;
font-size: 1.5rem;
}

h3 {
font-size: 1.25em;
font-size: 1.25rem;
}

h4 {
font-size: 1em;
font-size: 1rem;
}

h5 {
font-size: .75em;
font-size: .75rem;
}

h6 {
font-size: .5em;
font-size: .5rem;
}

/* Text elements */
p {
line-height: 1.4rem;
line-height: 1.4em;
}

/* Use this if the image is at the top of the <p>. */
Expand All @@ -39,6 +45,7 @@ p img.top {
}

img {
margin: 0 0 .75em;
margin: 0 0 .75rem;
}

Expand All @@ -49,6 +56,7 @@ abbr, acronym {

address {
font-style: italic;
margin-top: 1em;
margin-top: 1rem;
}

Expand Down Expand Up @@ -77,7 +85,9 @@ blockquote {
border-left: 4px solid #d1d1d1;
color: #666;
font-style: italic;
margin: 1em 0;
margin: 1rem 0;
padding-left: .75em;
padding-left: .75rem;
}

Expand All @@ -95,6 +105,7 @@ dfn {
}

pre, code {
margin: .75em 0;
margin: .75rem 0;
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
Expand All @@ -103,13 +114,16 @@ pre, code {

pre, code, tt {
font: .75rem 'andale mono', 'monotype.com', 'lucida console', monospace;
font-size: .75em;
font-size: .75rem;
line-height: 1.4em;
}

pre.code {
background: #000;
color: #fff;
padding: 1.25em;
padding: 1.25rem;
}

tt {
Expand Down

0 comments on commit 95d8d98

Please sign in to comment.