Created
September 6, 2015 11:27
-
-
Save ts-ign0re/0215a0487fdbdc1cf0f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Абстрактный контрол для создания радио и чекбоксов выбора цвета | |
// | |
control_theme_colored(block) | |
.{block}_theme_colored | |
&.{block} | |
display: inline-block | |
margin: 0 9.5px 0 0 | |
&_sm | |
zoom: 0.8 | |
.{block} | |
&__label | |
background: url('../img/add/colors_old.png') | |
width: 26px | |
height: 26px | |
display: inline-block | |
overflow: hidden | |
border-radius: 29px | |
cursor: pointer | |
transition: all .1s ease-in-out | |
&_stroke | |
border: 1px solid $c_stroke_light | |
&.{block}_checked .{block}__label | |
box-shadow: 0 0 0 3px darken($c_stroke_light, 10) | |
position: relative | |
&.{block}_checked .{block}__label:before | |
content: '' | |
display: inline-block | |
width: 100% | |
height: 100% | |
transform: scale(.6) | |
background: url('../img/icon/check-sm.png') | |
background-repeat: no-repeat | |
background-size: 100% | |
background-position: center center | |
position: absolute | |
top: 0 | |
left: 0 | |
// Генерируем радио | |
control_theme_colored(radio) | |
// Генерируем чекбоксы | |
control_theme_colored(checkbox) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment