Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions axis/forms.styl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,148 @@ field-success($color = $green)
input
input-success: $color

// Mixin: Radio
//
// A simple reset for radio button styling across browsers. Takes a color.
// Default color is blue. Use on the <label> which wraps your radio inputs.
//
// ex. radio()
// ex. radio: gray
// ex. radio(#FF1493)

radio($color = #0074d9)
cursor: pointer
display: block
line-height: 2.5em

// Accessible hidden styles
[type="radio"]
border: 0
clip: rect(0 0 0 0)
height: 1px
margin: -1px
overflow: hidden
padding: 0
position: absolute
width: 1px

& + span
display: block

// Unchecked
& + span:before
background: rgba(#000,.15)
border: 0.125em solid #fff
border-radius: 1em
box-shadow: 0 0 0 .1em rgba(#000, .25)
content: ''
display: inline-block
height: 1em
margin-right: 0.75em
transition: 0.5s ease all
vertical-align: -0.33em
width: 1em

// Checked
&:checked + span:before, &:focus + span:before
background: $color
box-shadow: 0 0 0 0.25em rgba(#000, .15)

// Mixin: Range-input
//
// A clean, cross-browser styling reset for range inputs.
// Note: range inputs are not supported in IE9 and below.
// http://caniuse.com/#feat=input-range
//
// ex. range()
// ex. range: tomato 200px 15px 9px #333

range-input($color = #0074d9, $track-width = 100%, $thumb-size = 2em, $track-height = .5em, $track-color = rgba(#000, .1))
-webkit-appearance: none
width: $track-width
margin: 0
outline: none
background: transparent

&::-webkit-slider-runnable-track
background: $track-color
border: none
border-radius: $track-height
height: $track-height
width: $track-width

&::-webkit-slider-thumb
-webkit-appearance: none
border: none
height: $thumb-size
width: $thumb-size
border-radius: 50%
background: $color
margin-top: "calc(-%s / 2 + %s / 2)" % ($thumb-size $track-height)
transition: all 0.2s ease

&:hover
transform: scale(1.2)
cursor: pointer

&:active
background: darken($color, 15%)

&:focus
outline: none

&:focus::-webkit-slider-runnable-track
background: $track-color

&::-moz-range-track
width: $track-width
height: $track-height
background: $track-color
border: none
border-radius: $track-height

&::-moz-range-thumb
border: none
height: $thumb-size
width: $thumb-size
border-radius: 50%
background: $color
transition: all 0.2s ease

&:hover
transform: scale(1.2)

&:active
background: darken($color, 15%)

&::-moz-focus-outer
border: 0

&::-ms-track
height: $track-height
width: $track-width
background: transparent
border-width: "calc(%s / 2 + %s / 2)" % ($thumb-size $track-height) 0
color: transparent;

&::-ms-fill-lower, &::-ms-fill-upper, &:focus::-ms-fill-lower, &:focus::-ms-fill-upper
background: $track-color
border-radius: 10px

&::-ms-thumb
border: none
height: 2em
width: 2em
border-radius: 50%
background: $color

&:active
background: darken($color, 15%)

&::-ms-tooltip
display: none


// Additive Mixin: Fields
//
// WARNING: Creates classes in your css and styles them - not to be used inside
Expand Down
2 changes: 1 addition & 1 deletion axis/layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
group()
&:after
content: ""
display: table
display: block
clear: both

// Alias: clearfix
Expand Down
141 changes: 0 additions & 141 deletions axis/ui.styl
Original file line number Diff line number Diff line change
Expand Up @@ -355,144 +355,3 @@ flash-notices()
flash(notice)
&.success
flash(success)

// Mixin: Radio
//
// A simple reset for radio button styling across browsers. Takes a color.
// Default color is blue. Use on the <label> which wraps your radio inputs.
//
// ex. radio()
// ex. radio: gray
// ex. radio(#FF1493)

radio($color = #0074d9)
cursor: pointer
display: block
line-height: 2.5em

// Accessible hidden styles
[type="radio"]
border: 0
clip: rect(0 0 0 0)
height: 1px
margin: -1px
overflow: hidden
padding: 0
position: absolute
width: 1px

& + span
display: block

// Unchecked
& + span:before
background: rgba(#000,.15)
border: 0.125em solid #fff
border-radius: 1em
box-shadow: 0 0 0 .1em rgba(#000, .25)
content: ''
display: inline-block
height: 1em
margin-right: 0.75em
transition: 0.5s ease all
vertical-align: -0.33em
width: 1em

// Checked
&:checked + span:before, &:focus + span:before
background: $color
box-shadow: 0 0 0 0.25em rgba(#000, .15)

// Mixin: Range
//
// A clean, cross-browser styling reset for range inputs.
// Note: range inputs are not supported in IE9 and below.
// http://caniuse.com/#feat=input-range
//
// ex. range()
// ex. range: tomato 200px 15px 9px #333

range($color = #0074d9, $track-width = 100%, $thumb-size = 2em, $track-height = .5em, $track-color = rgba(#000, .1))
-webkit-appearance: none
width: $track-width
margin: 0
outline: none
background: transparent

&::-webkit-slider-runnable-track
background: $track-color
border: none
border-radius: $track-height
height: $track-height
width: $track-width

&::-webkit-slider-thumb
-webkit-appearance: none
border: none
height: $thumb-size
width: $thumb-size
border-radius: 50%
background: $color
margin-top: "calc(-%s / 2 + %s / 2)" % ($thumb-size $track-height)
transition: all 0.2s ease

&:hover
transform: scale(1.2)
cursor: pointer

&:active
background: darken($color, 15%)

&:focus
outline: none

&:focus::-webkit-slider-runnable-track
background: $track-color

&::-moz-range-track
width: $track-width
height: $track-height
background: $track-color
border: none
border-radius: $track-height

&::-moz-range-thumb
border: none
height: $thumb-size
width: $thumb-size
border-radius: 50%
background: $color
transition: all 0.2s ease

&:hover
transform: scale(1.2)

&:active
background: darken($color, 15%)

&::-moz-focus-outer
border: 0

&::-ms-track
height: $track-height
width: $track-width
background: transparent
border-width: "calc(%s / 2 + %s / 2)" % ($thumb-size $track-height) 0
color: transparent;

&::-ms-fill-lower, &::-ms-fill-upper, &:focus::-ms-fill-lower, &:focus::-ms-fill-upper
background: $track-color
border-radius: 10px

&::-ms-thumb
border: none
height: 2em
width: 2em
border-radius: 50%
background: $color

&:active
background: darken($color, 15%)

&::-ms-tooltip
display: none
2 changes: 1 addition & 1 deletion test/fixtures/additive/framework.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ blockquote {
}
blockquote:after {
content: "";
display: table;
display: block;
clear: both;
}
blockquote > p {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions test/fixtures/forms/range.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.range
range-input()
4 changes: 2 additions & 2 deletions test/fixtures/layout/group.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.group:after {
content: "";
display: table;
display: block;
clear: both;
}
.clearfix:after {
content: "";
display: table;
display: block;
clear: both;
}
2 changes: 1 addition & 1 deletion test/fixtures/typography/blockquo.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
.blockquote:after {
content: "";
display: table;
display: block;
clear: both;
}
.blockquote > p {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/typography/lists.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
.inline-list:after {
content: "";
display: table;
display: block;
clear: both;
}
.inline-list li {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/ui/breadcrumb.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}
.breadcrumb:after {
content: "";
display: table;
display: block;
clear: both;
}
.breadcrumb li {
Expand Down
Loading