mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
range icons
This commit is contained in:
47
dist/css/ionic.css
vendored
47
dist/css/ionic.css
vendored
@ -2503,7 +2503,8 @@ input[type="range"] {
|
|||||||
outline: none;
|
outline: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: #cccccc;
|
background-color: #cccccc;
|
||||||
-webkit-appearance: none !important; }
|
-webkit-appearance: none !important;
|
||||||
|
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, blue), color-stop(0, #cccccc)); }
|
||||||
input[type="range"]::-webkit-slider-thumb {
|
input[type="range"]::-webkit-slider-thumb {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
@ -2516,12 +2517,48 @@ input[type="range"] {
|
|||||||
input[type="range"]::-webkit-slider-thumb:after {
|
input[type="range"]::-webkit-slider-thumb:after {
|
||||||
/* create a larger (but hidden) hit area */
|
/* create a larger (but hidden) hit area */
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -10px;
|
top: -15px;
|
||||||
left: -10px;
|
left: -15px;
|
||||||
display: table;
|
padding: 25px;
|
||||||
padding: 20px;
|
|
||||||
content: ' '; }
|
content: ' '; }
|
||||||
|
|
||||||
|
.range {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -moz-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-ms-flex-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
-moz-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 4px;
|
||||||
|
max-width: 320px; }
|
||||||
|
|
||||||
|
.range .icon {
|
||||||
|
-webkit-box-flex: 0;
|
||||||
|
-webkit-flex: 0 1 24px;
|
||||||
|
-moz-box-flex: 0;
|
||||||
|
-moz-flex: 0 1 24px;
|
||||||
|
-ms-flex: 0 1 24px;
|
||||||
|
flex: 0 1 24px;
|
||||||
|
font-size: 24px;
|
||||||
|
min-width: 24px;
|
||||||
|
text-align: center; }
|
||||||
|
|
||||||
|
.range input {
|
||||||
|
-webkit-box-flex: 0;
|
||||||
|
-webkit-flex: 0 1 272px;
|
||||||
|
-moz-box-flex: 0;
|
||||||
|
-moz-flex: 0 1 272px;
|
||||||
|
-ms-flex: 0 1 272px;
|
||||||
|
flex: 0 1 272px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 320px; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Buttons
|
* Buttons
|
||||||
* --------------------------------------------------
|
* --------------------------------------------------
|
||||||
|
|||||||
@ -15,6 +15,14 @@ input[type="range"] {
|
|||||||
background-color: $range-track-color;
|
background-color: $range-track-color;
|
||||||
-webkit-appearance: none !important;
|
-webkit-appearance: none !important;
|
||||||
|
|
||||||
|
background-image: -webkit-gradient(
|
||||||
|
linear,
|
||||||
|
left top,
|
||||||
|
right top,
|
||||||
|
color-stop(0.0, blue),
|
||||||
|
color-stop(0.0, $range-track-color)
|
||||||
|
);
|
||||||
|
|
||||||
&::-webkit-slider-thumb {
|
&::-webkit-slider-thumb {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: $range-slider-width;
|
width: $range-slider-width;
|
||||||
@ -29,11 +37,32 @@ input[type="range"] {
|
|||||||
&::-webkit-slider-thumb:after {
|
&::-webkit-slider-thumb:after {
|
||||||
/* create a larger (but hidden) hit area */
|
/* create a larger (but hidden) hit area */
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -10px;
|
top: -15px;
|
||||||
left: -10px;
|
left: -15px;
|
||||||
display: table;
|
padding: 25px;
|
||||||
padding: 20px;
|
|
||||||
content: ' ';
|
content: ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.range {
|
||||||
|
@include display-flex();
|
||||||
|
@include align-items(center);
|
||||||
|
padding: 4px;
|
||||||
|
max-width: $range-max-width;
|
||||||
|
}
|
||||||
|
|
||||||
|
.range .icon {
|
||||||
|
@include flex(0, 1, $range-icon-size);
|
||||||
|
font-size: $range-icon-size;
|
||||||
|
min-width: $range-icon-size;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.range input {
|
||||||
|
@include flex(0, 1, $range-max-width - ($range-icon-size * 2));
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: $range-max-width;
|
||||||
|
}
|
||||||
|
|||||||
@ -447,6 +447,8 @@ $range-track-color: #ccc;
|
|||||||
$range-slider-width: 20px;
|
$range-slider-width: 20px;
|
||||||
$range-slider-height: 20px;
|
$range-slider-height: 20px;
|
||||||
$range-slider-border-radius: 10px;
|
$range-slider-border-radius: 10px;
|
||||||
|
$range-icon-size: 24px;
|
||||||
|
$range-max-width: 320px;
|
||||||
|
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
|
|||||||
@ -21,6 +21,12 @@
|
|||||||
<input type="range" name="awesomeness" min="0" max="10" value="10">
|
<input type="range" name="awesomeness" min="0" max="10" value="10">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div class="range">
|
||||||
|
<i class="icon ion-volume-low"></i>
|
||||||
|
<input type="range" name="awesomeness" min="0" max="10" value="10">
|
||||||
|
<i class="icon ion-volume-high"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="padding">
|
<div class="padding">
|
||||||
<p><a class="button button-secondary" href="index.html">Homepage</a></p>
|
<p><a class="button button-secondary" href="index.html">Homepage</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user