From fd2d2e9a744889d3c03055c552f7006f2c7bfa2f Mon Sep 17 00:00:00 2001 From: Graham Wagener Date: Thu, 12 Apr 2012 17:13:36 +1200 Subject: [PATCH 1/2] Used SCSS nesting. --- app/assets/stylesheets/theme.scss | 184 +++++++++++++++--------------- 1 file changed, 90 insertions(+), 94 deletions(-) diff --git a/app/assets/stylesheets/theme.scss b/app/assets/stylesheets/theme.scss index 19fbf0c..1f1c506 100644 --- a/app/assets/stylesheets/theme.scss +++ b/app/assets/stylesheets/theme.scss @@ -43,49 +43,49 @@ header { height: 10em; background: rgba(0, 0, 0, 0.9); color: #f2f2f2; -} - -header h1 { - float: right; - margin: 0.125em 0 0.125em 0; - text-transform: uppercase; - font-size: 8em; - line-height: 1em; - width: 65%; - white-space: nowrap; -} - -header h1 a { - color: #ff5800; - text-decoration: none; -} - -header nav { - float: right; - border-right: 1px solid white; - margin: 1em; - padding: 0.5em 1em; -} -header nav ul { - margin: 0; - padding: 0; -} - -header nav ul li { - display: block; - list-style-type: none; - text-align: right; - font-size: 1.25em; - line-height: 1.375em; - vertical-align: middle; -} - -header nav ul li a { - color: white; - text-decoration: none; - font-family: 'Francois One', sans-serif; - text-transform: uppercase; + h1 { + float: right; + margin: 0.125em 0 0.125em 0; + text-transform: uppercase; + font-size: 8em; + line-height: 1em; + width: 65%; + white-space: nowrap; + + a { + color: #ff5800; + text-decoration: none; + } + } + + nav { + float: right; + border-right: 1px solid white; + margin: 1em; + padding: 0.5em 1em; + + ul { + margin: 0; + padding: 0; + + li { + display: block; + list-style-type: none; + text-align: right; + font-size: 1.25em; + line-height: 1.375em; + vertical-align: middle; + + a { + color: white; + text-decoration: none; + font-family: 'Francois One', sans-serif; + text-transform: uppercase; + } + } + } + } } #page, footer { @@ -104,9 +104,6 @@ header nav ul li a { color: #999; } -#side_body .inner { -} - footer { margin-top: 3em; border-top: 1px solid #ccc; @@ -120,54 +117,53 @@ footer { background: #eee; box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2), 0 1px 0 white; border-radius: 0.5em; -} -.inquiries form .field { - margin: 0 0 0.5em; + .field { + margin: 0 0 0.5em; + + label { + clear: left; + float: left; + width: 15%; + text-transform: uppercase; + color: #666; + line-height: 2em; + vertical-align: middle; + } + + input, textarea { + width: 70%; + line-height: 1.5; + } + } + + .actions { + margin-left: 15%; + + input { + background: #ff5800; + border: 1px solid #ff5800; + border-radius: 4px; + box-shadow: inset 0 1px 10px 1px rgba(255, 255, 255, 0.4), 0 0.25em 0px #7f2c00, 0 0.25em 0.5em rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 1.5em; + font-weight: bold; + line-height: 1; + margin-bottom: 1em; + padding: 8px 1em 10px; + text-align: center; + text-shadow: 0px -1px 1px #1e2d4d; + -webkit-background-clip: padding-box; + + &:hover { + box-shadow: inset 0 1px 20px 1px rgba(255, 255, 255, 0.5), 0 0.25em 0px #7f2c00, 0 0.25em 0.5em rgba(0, 0, 0, 0.5); + cursor: pointer; + } + + &:active { + box-shadow: inset 0 1px 20px 1px rgba(255, 255, 255, 0.5), 0 0.05em 0px #7f2c00, 0 0.05em 0.05em rgba(0, 0, 0, 0.5); + margin-top: 0.2em; + } + } + } } - -.inquiries form .field label { - clear: left; - float: left; - width: 15%; - text-transform: uppercase; - color: #666; - line-height: 2em; - vertical-align: middle; -} - -.inquiries form .field input, -.inquiries form .field textarea { - width: 70%; - line-height: 1.5; -} - -.inquiries form .actions { - margin-left: 15%; -} - -.inquiries form .actions input { - background: #ff5800; - border: 1px solid #ff5800; - border-radius: 4px; - box-shadow: inset 0 1px 10px 1px rgba(255, 255, 255, 0.4), 0 0.25em 0px #7f2c00, 0 0.25em 0.5em rgba(0, 0, 0, 0.5); - color: #fff; - font-size: 1.5em; - font-weight: bold; - line-height: 1; - margin-bottom: 1em; - padding: 8px 1em 10px; - text-align: center; - text-shadow: 0px -1px 1px #1e2d4d; - -webkit-background-clip: padding-box; -} - -.inquiries form .actions input:hover { - box-shadow: inset 0 1px 20px 1px rgba(255, 255, 255, 0.5), 0 0.25em 0px #7f2c00, 0 0.25em 0.5em rgba(0, 0, 0, 0.5); - cursor: pointer; -} - -.inquiries form .actions input:active { - box-shadow: inset 0 1px 20px 1px rgba(255, 255, 255, 0.5), 0 0.05em 0px #7f2c00, 0 0.05em 0.05em rgba(0, 0, 0, 0.5); - margin-top: 0.2em; -} \ No newline at end of file From de396c95388b14029376e3e41f53536f405476c0 Mon Sep 17 00:00:00 2001 From: Graham Wagener Date: Thu, 12 Apr 2012 17:16:16 +1200 Subject: [PATCH 2/2] Renamed scss file to include compiled extension. --- app/assets/stylesheets/{theme.scss => theme.css.scss} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename app/assets/stylesheets/{theme.scss => theme.css.scss} (98%) diff --git a/app/assets/stylesheets/theme.scss b/app/assets/stylesheets/theme.css.scss similarity index 98% rename from app/assets/stylesheets/theme.scss rename to app/assets/stylesheets/theme.css.scss index 1f1c506..7b8efe5 100644 --- a/app/assets/stylesheets/theme.scss +++ b/app/assets/stylesheets/theme.css.scss @@ -7,14 +7,14 @@ body, input, textarea, select, td { font: 14px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; } -p,h1,h2,h3,h4,h5,h6 { +p, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; font-size: 100%; } p { - margin: 0 0 0.75em; + margin-bottom: 0.75em; } h1, h2, h3, h4, h5, h6 {