Skip to content

Commit

Permalink
QBtn Active Effect Shadow Transition Fix (#1460)
Browse files Browse the repository at this point in the history
realcarbonneau authored and rstoenescu committed Jan 22, 2018
1 parent 81c7bfc commit 7337478
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions src/components/btn/btn-default.mat.styl
Original file line number Diff line number Diff line change
@@ -26,20 +26,25 @@
&.full-width
border-radius 0 !important

&:active:not(.disabled):not(.q-btn-flat):not(.q-btn-outline):not(.q-btn-push):after
// This places the button active raise shadow behind adjacent elements
// Active raise shadow will still be visible under adjacent transparent elements, this is ok and coherent with a desired transparency effect.
// Visible active raise shadow can be removed by specifying a background color to the button
// Visible active raise shadow can be removed by specifying a flat or outline button type
content ''
position absolute
top 0
right 0
bottom 0
left 0
box-shadow $shadow-8
border-radius inherit
z-index -1
&:not(.disabled):not(.q-btn-flat):not(.q-btn-outline):not(.q-btn-push)
&:after
// This places the button active raise shadow behind adjacent elements
// Active raise shadow will still be visible under adjacent transparent elements, this is ok and coherent with a desired transparency effect.
// Visible active raise shadow can be removed by specifying a background color to the button
// Visible active raise shadow can be removed by specifying a flat or outline button type
content ''
position absolute
top 0
right 0
bottom 0
left 0
border-radius inherit
z-index -1
transition $button-transition
&:active:after
// Transitions on the creation of pseudoelements do not work
// pseudoelement must already exist, then the shadow is added when required.
box-shadow $shadow-8

.q-btn-progress
transition all .3s

0 comments on commit 7337478

Please sign in to comment.