Skip to content

Commit

Permalink
improve: sass variable for width in switch field
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Jun 16, 2016
1 parent 534c384 commit e01b816
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/fields/fieldSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
input(type="checkbox", v-model="value", :disabled="disabled")
span.label(:data-on="schema.textOn || 'On'", :data-off="schema.textOff || 'Off'")
span.handle
span {{ this | json}}
</template>

<script>
Expand All @@ -16,11 +15,13 @@

<style lang="sass" scoped>
$width: 120px;
label {
position: relative;
display: block;
vertical-align: top;
width: 100px;
width: $width;
height: 30px;
padding: 3px;
margin: 0 10px 10px 0;
Expand Down Expand Up @@ -105,7 +106,7 @@
box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
}
input:checked ~ .handle {
left: 74px;
left: $width - 26px;
box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
}
Expand Down

0 comments on commit e01b816

Please sign in to comment.