From 0deb17e00b1b9edb2c40eaf4eaed98e4675fb471 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 19 Jul 2015 20:46:15 +0300 Subject: [PATCH] OpenFest: Add form styling --- .../assets/stylesheets/open_fest/_forms.scss | 140 ++++++++++++++++++ .../stylesheets/open_fest/application.scss | 1 + 2 files changed, 141 insertions(+) create mode 100644 lib/open_fest/app/assets/stylesheets/open_fest/_forms.scss diff --git a/lib/open_fest/app/assets/stylesheets/open_fest/_forms.scss b/lib/open_fest/app/assets/stylesheets/open_fest/_forms.scss new file mode 100644 index 0000000..f5645af --- /dev/null +++ b/lib/open_fest/app/assets/stylesheets/open_fest/_forms.scss @@ -0,0 +1,140 @@ +.alert-error { + color: red; +} + +.input { + position: relative; + margin: 0 0 1em 0; + border-top: 0.1em dotted #999; + padding: 1em 0; +} + +.input label { + font-size: 1em; + display: block; + width: 12em; + float: left; +} + +.input { + input.string, input.email, input.password, select.select, input.numeric { + font-size: 1em; + width: 20em; + float: left; + } + + textarea { + height: 15em; + width: 50em; + } + + img { + padding: 5px; + display: block; + border: 1px solid #CCC; + background-color: #F1F1F1; + + } + + img+input.image_preview { + margin-left: 12.7em; + } + +} + +.input label.boolean { + margin-left: 12em; +} + +.input .hint, .input .error { + display: block; + clear: both; + font-size: 0.75em; + font-style: italic; + width: 20em; + margin: 0 0 0 16em; + padding: 1em 0 0 0; +} + +.input .error { + font-style: normal; + padding: 1em 0 0 0; + color: #F00; +} + +.input .error::before { + content: "⇧"; + display: inline-block; + font-size: 2em; + margin: 0 0.2em 0 0; + transform: translate(0, 0.1em); +} + +.btn { + display: block; + margin: 2em 0 0 13em; +} + +/* styling of the button */ +.btn { + background: #233e83; + padding: 0.4em 0.8em; + border-radius: 0.2em; + color: #FFF; + border: none; + border-bottom: 0.2em solid #7A95DC; + cursor: pointer; + transition: background 200ms, border 200ms, transform 200ms; + -webkit-transition: background 200ms, border 200ms, transform 200ms; +} + +.btn:hover { + background: #152551; +} + +.btn:active { + background: #597AD2; + border-bottom: 0.2em solid #000; + transform: translate(0, 0.1em); + -webkit-transform: translate(0, 0.1em); +} + +.centered { + text-align: center; +} + +.large { + padding: 30px; +} + +.btn-link { + background: #233e83; + padding: 0.4em 0.8em; + border-radius: 0.2em; + color: #FFF; + border: none; + border-bottom: 0.2em solid #7A95DC; + cursor: pointer; + transition: background 200ms, border 200ms, transform 200ms; + -webkit-transition: background 200ms, border 200ms, transform 200ms; +} + +.btn-link:link, .btn-link:active, .btn-link:visited { + color: #FFF; + text-decoration: none; + } + +.btn-link:hover { + background: #152551; +} + +.btn-link:active { + background: #597AD2; + border-bottom: 0.2em solid #000; + transform: translate(0, 0.1em); + -webkit-transform: translate(0, 0.1em); +} + +.btn-link-large { + font-size: 2em; +} diff --git a/lib/open_fest/app/assets/stylesheets/open_fest/application.scss b/lib/open_fest/app/assets/stylesheets/open_fest/application.scss index 1340a6e..604c31c 100644 --- a/lib/open_fest/app/assets/stylesheets/open_fest/application.scss +++ b/lib/open_fest/app/assets/stylesheets/open_fest/application.scss @@ -2,3 +2,4 @@ @import "font-awesome"; @import 'initfest/styles'; +@import 'forms';