Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
1d3b58fb
Commit
1d3b58fb
authored
Aug 19, 2014
by
Aron Carroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move common form styles into mixins
parent
ccc6f437
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
54 deletions
+84
-54
base.scss
h/static/styles/base.scss
+0
-4
forms.scss
h/static/styles/forms.scss
+11
-50
forms.scss
h/static/styles/mixins/forms.scss
+73
-0
No files found.
h/static/styles/base.scss
View file @
1d3b58fb
...
@@ -18,10 +18,6 @@ $error-red: $hypothered-desat !default;
...
@@ -18,10 +18,6 @@ $error-red: $hypothered-desat !default;
$error-red-light
:
#e0b0b0
!
default
;
$error-red-light
:
#e0b0b0
!
default
;
$error-red-lightest
:
#fff1f3
!
default
;
$error-red-lightest
:
#fff1f3
!
default
;
$focus-yellow
:
#fffbeb
!
default
;
$focus-yellow-dark
:
#ece3c5
!
default
;
$focus-yellow-darker
:
#cbbb95
!
default
;
$button-text-color
:
$gray-dark
!
default
;
$button-text-color
:
$gray-dark
!
default
;
$button-background-start
:
$white
!
default
;
$button-background-start
:
$white
!
default
;
$button-background-end
:
#f0f0f0
!
default
;
$button-background-end
:
#f0f0f0
!
default
;
...
...
h/static/styles/forms.scss
View file @
1d3b58fb
// Common form styles.
// Common form styles.
@import
"mixins/forms"
;
@import
"compass/css3/images"
;
@import
"compass/css3/images"
;
@import
"compass/utilities/general/clearfix"
;
@import
"compass/utilities/general/clearfix"
;
...
@@ -68,36 +69,17 @@
...
@@ -68,36 +69,17 @@
}
}
.form-input
{
.form-input
{
border
:
1px
solid
$gray-lighter
;
@include
form-input
;
border-radius
:
2px
;
padding
:
7px
10px
;
font-weight
:
normal
;
font-size
:
15px
;
color
:
$gray
;
background-color
:
#FAFAFA
;
&
:focus
,
&
.js-focus
{
&
:focus
,
&
.js-focus
{
outline
:
none
;
@include
form-input-focus
;
background-color
:
#FFF
;
border-color
:
#51A7E8
;
box-shadow
:
0px
1px
2px
rgba
(
0
,
0
,
0
,
0
.075
)
inset
,
0px
0px
5px
rgba
(
81
,
167
,
232
,
0
.5
);
@include
placeholder
{
color
:
$gray
;
}
}
}
}
}
.form-field-error
{
.form-field-error
{
.form-input
{
.form-input
{
&
,
&
:focus
,
&
.js-focus
{
&
,
&
:focus
,
&
.js-focus
{
color
:
$error-red
;
@include
form-input-error
;
border-color
:
$error-red-light
;
background-color
:
$error-red-lightest
;
}
@include
placeholder
{
color
:
$error-red-light
;
}
}
}
}
...
@@ -207,44 +189,23 @@
...
@@ -207,44 +189,23 @@
}
}
.btn
{
.btn
{
@include
background
(
linear-gradient
(
$button-background-gradient
...
));
@include
btn
;
@include
box-shadow
(
0
1px
0
rgba
(
0
,
0
,
0
,
0
.15
));
display
:
inline-block
;
font-size
:
13px
;
font-weight
:
bold
;
color
:
$button-text-color
;
text-shadow
:
0
1px
0
#FFF
;
border-radius
:
2px
;
border
:
1px
solid
#ACACAC
;
padding
:
7px
12px
6px
;
&
:hover
,
&
:active
,
&
.js-hover
,
&
.js-active
{
&
:hover
,
&
:focus
,
&
:active
,
@include
box-shadow
(
0
1px
0
rgba
(
0
,
0
,
0
,
0
.05
));
&
.js-hover
,
&
.js-focus
,
&
.js-active
{
outline
:
none
;
@include
btn-hover
;
color
:
$button-text-color
;
background
:
$button-background-start
;
border-color
:
#bababa
;
}
}
&
:focus
,
&
.js-focus
{
&
:focus
,
&
.js-focus
{
border-color
:
#51A7E8
;
@include
focus-outline
;
box-shadow
:
0px
1px
2px
rgba
(
0
,
0
,
0
,
0
.075
)
inset
,
0px
0px
5px
rgba
(
81
,
167
,
232
,
0
.5
);
}
}
&
:active
,
&
.js-active
{
&
:active
,
&
.js-active
{
@include
box-shadow
(
inset
0
1px
0
rgba
(
0
,
0
,
0
,
0
.1
));
@include
btn-active
;
background
:
$button-background-end
;
color
:
#424242
;
border-color
:
#bababa
;
}
}
&
[
disabled
],
&
.js-disabled
{
&
[
disabled
],
&
.js-disabled
{
@include
box-shadow
(
none
);
@include
btn-disabled
;
cursor
:
default
;
background
:
#F0F0F0
;
border-color
:
#CECECE
;
color
:
$gray-light
;
}
}
}
}
...
...
h/static/styles/mixins/forms.scss
0 → 100644
View file @
1d3b58fb
@import
"../base"
;
@mixin
focus-outline
{
border-color
:
#51A7E8
;
box-shadow
:
0px
1px
2px
rgba
(
0
,
0
,
0
,
0
.075
)
inset
,
0px
0px
5px
rgba
(
81
,
167
,
232
,
0
.5
);
}
@mixin
form-input
{
border
:
1px
solid
$gray-lighter
;
border-radius
:
2px
;
padding
:
7px
10px
;
font-weight
:
normal
;
font-size
:
15px
;
color
:
$gray
;
background-color
:
#FAFAFA
;
}
@mixin
form-input-focus
{
outline
:
none
;
background-color
:
#FFF
;
@include
focus-outline
;
@include
placeholder
{
color
:
$gray
;
}
}
@mixin
form-input-error
{
color
:
$error-red
;
border-color
:
$error-red-light
;
background-color
:
$error-red-lightest
;
@include
placeholder
{
color
:
$error-red-light
;
}
}
@mixin
btn
{
@include
background
(
linear-gradient
(
$button-background-gradient
...
));
@include
box-shadow
(
0
1px
0
rgba
(
0
,
0
,
0
,
0
.15
));
display
:
inline-block
;
font-size
:
13px
;
font-weight
:
bold
;
color
:
$button-text-color
;
text-shadow
:
0
1px
0
#FFF
;
border-radius
:
2px
;
border
:
1px
solid
#ACACAC
;
padding
:
7px
12px
6px
;
}
@mixin
btn-hover
{
@include
box-shadow
(
0
1px
0
rgba
(
0
,
0
,
0
,
0
.05
));
outline
:
none
;
color
:
$button-text-color
;
background
:
$button-background-start
;
border-color
:
#bababa
;
}
@mixin
btn-active
{
@include
box-shadow
(
inset
0
1px
0
rgba
(
0
,
0
,
0
,
0
.1
));
background
:
$button-background-end
;
color
:
#424242
;
border-color
:
#bababa
;
}
@mixin
btn-disabled
{
@include
box-shadow
(
none
);
cursor
:
default
;
background
:
#F0F0F0
;
border-color
:
#CECECE
;
color
:
$gray-light
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment