Summary Files Commits Branches @commit @diff @stats
path: root / src / forms.less
diff options
context:
space:
mode:
Commit701bb9bf63d37d1759e38eb25102d9281a007d88 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2016-03-12 12:18:02 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2016-03-12 12:18:02 +0800
Files7d79f4548ae6908408b5c561699dd3ae86e6feae /src/forms.less
Spectre-Dark-Gruvbox-701bb9bf63d37d1759e38eb25102d9281a007d88.tar
Spectre-Dark-Gruvbox-701bb9bf63d37d1759e38eb25102d9281a007d88.tar.gz
Spectre-Dark-Gruvbox-701bb9bf63d37d1759e38eb25102d9281a007d88.zip
Parent77c06f328ee535558626660c7c7aac234572b98a (diff)
add input style
1 files changed, 74 insertions, 0 deletions
-rw-r--r--src/forms.less74
diff --git a/src/forms.less b/src/forms.less
new file mode 100644
index 0000000..95ed387
--- /dev/null
+++ b/src/forms.less
@@ -0,0 +1,74 @@
+// Forms
+.form-group:not(:last-child) {
+ margin-bottom: 1rem;
+}
+form,
+.form-group {
+ .label {
+ display: block;
+ margin-bottom: .5rem;
+ }
+}
+.input {
+ position: relative;
+ display: block;
+ width: 100%;
+ max-width: 100%;
+ height: 3.2rem;
+ background-color: #fff;
+ background-image: none;
+ border: .1rem solid @control-color;
+ border-radius: 3px;
+ color: @body-font-color;
+ font-size: 1.4rem;
+ line-height: 1.6rem;
+ padding: .7rem .8rem;
+ -webkit-appearance: none;
+ outline: 0;
+
+ &:focus {
+ border-color: @core-color;
+ }
+
+ &[disabled] {
+ opacity: .75;
+ background-color: #eeeff2;
+ pointer-events: none;
+ }
+
+ // Input Small
+ &.input-sm {
+ height: 2.4rem;
+ border-radius: 2px;
+ font-size: 1.2rem;
+ line-height: 1.4rem;
+ padding: .4rem .6rem;
+ }
+
+ // Input Large
+ &.input-lg {
+ height: 4.2rem;
+ border-radius: 4px;
+ font-size: 1.8rem;
+ line-height: 2rem;
+ padding: 1rem 1.2rem;
+ }
+
+ // Input Inlines
+ &.input-inline {
+ width: auto;
+ display: inline-block;
+ }
+
+ // Status
+ &.is-success {
+ border-color: @control-color-success;
+ }
+ &.is-danger {
+ border-color: @control-color-danger;
+ }
+
+ // TODO: Input with icons
+}
+
+