Skip to content

Commit c348ce5

Browse files
committed
feat(QBtn): Small tweaks to push style
1 parent 729b553 commit c348ce5

File tree

6 files changed

+38
-18
lines changed

6 files changed

+38
-18
lines changed

ui/src/components/btn-group/QBtnGroup.sass

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
border-top-right-radius: inherit
2222
border-bottom-right-radius: inherit
2323
> .q-btn-group:not(:first-child) > .q-btn:first-child
24-
border-left: 0
24+
.q-btn__wrapper:before
25+
border-left: 0
2526
> .q-btn-group:not(:last-child) > .q-btn:last-child
26-
border-right: 0
27+
.q-btn__wrapper:before
28+
border-right: 0
2729
> .q-btn-item:not(:last-child)
2830
border-top-right-radius: 0
2931
border-bottom-right-radius: 0
@@ -46,25 +48,31 @@
4648
&:active,
4749
&.q-btn--active
4850
.q-btn__wrapper
49-
margin-top: 3px
50-
margin-bottom: -3px
51+
margin-top: 2px
52+
margin-bottom: -2px
5153
&--rounded
5254
border-radius: $button-rounded-border-radius
55+
5356
&--flat, &--outline, &--unelevated
5457
box-shadow: none
5558
> .q-btn-item
5659
.q-btn__wrapper:before
5760
box-shadow: none
61+
5862
&--outline
5963
> .q-separator
6064
display: none
6165
> .q-btn-item + .q-btn-item
62-
border-left: 0
66+
.q-btn__wrapper:before
67+
border-left: 0
6368
> .q-btn-item:not(:last-child)
64-
border-right: 0
69+
.q-btn__wrapper:before
70+
border-right: 0
71+
6572
&--stretch
6673
align-self: stretch
6774
border-radius: 0
75+
6876
&--glossy
6977
> .q-btn-item
7078
background-image: linear-gradient(to bottom, rgba(#fff, .3), rgba(#fff, 0) 50%, rgba(#000, .12) 51%, rgba(#000, .04)) !important

ui/src/components/btn-group/QBtnGroup.styl

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
border-top-right-radius inherit
2222
border-bottom-right-radius inherit
2323
> .q-btn-group:not(:first-child) > .q-btn:first-child
24-
border-left 0
24+
.q-btn__wrapper:before
25+
border-left 0
2526
> .q-btn-group:not(:last-child) > .q-btn:last-child
26-
border-right 0
27+
.q-btn__wrapper:before
28+
border-right 0
2729
> .q-btn-item:not(:last-child)
2830
border-top-right-radius 0
2931
border-bottom-right-radius 0
@@ -46,25 +48,31 @@
4648
&:active,
4749
&.q-btn--active
4850
.q-btn__wrapper
49-
margin-top 3px
50-
margin-bottom -3px
51+
margin-top 2px
52+
margin-bottom -2px
5153
&--rounded
5254
border-radius $button-rounded-border-radius
55+
5356
&--flat, &--outline, &--unelevated
5457
box-shadow none
5558
> .q-btn-item
5659
.q-btn__wrapper:before
5760
box-shadow none
61+
5862
&--outline
5963
> .q-separator
6064
display none
6165
> .q-btn-item + .q-btn-item
62-
border-left 0
66+
.q-btn__wrapper:before
67+
border-left 0
6368
> .q-btn-item:not(:last-child)
64-
border-right 0
69+
.q-btn__wrapper:before
70+
border-right 0
71+
6572
&--stretch
6673
align-self stretch
6774
border-radius 0
75+
6876
&--glossy
6977
> .q-btn-item
7078
background-image linear-gradient(to bottom, rgba(white, .3), rgba(white, 0) 50%, rgba(black, .12) 51%, rgba(black, .04)) !important

ui/src/components/btn/QBtn.sass

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@
6565
border-radius: $button-border-radius
6666

6767
&--outline
68-
border: 1px solid currentColor
6968
background: transparent !important
7069

70+
.q-btn__wrapper:before
71+
border: 1px solid currentColor
72+
7173
&--push
7274
border-radius: $button-push-border-radius
7375

@@ -82,7 +84,7 @@
8284

8385
&:active,
8486
&.q-btn--active
85-
transform: translateY(3px)
87+
transform: translateY(2px)
8688

8789
.q-btn__wrapper:before
8890
border-bottom-width: 0

ui/src/components/btn/QBtn.styl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@
6565
border-radius $button-border-radius
6666

6767
&--outline
68-
border 1px solid currentColor
6968
background transparent !important
7069

70+
.q-btn__wrapper:before
71+
border 1px solid currentColor
72+
7173
&--push
7274
border-radius $button-push-border-radius
7375

@@ -82,7 +84,7 @@
8284

8385
&:active,
8486
&.q-btn--active
85-
transform translateY(3px)
87+
transform translateY(2px)
8688

8789
.q-btn__wrapper:before
8890
border-bottom-width 0

ui/src/css/variables.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ $button-padding : 4px 16px !default
466466
$button-dense-padding : .285em !default
467467
$button-transition : $generic-hover-transition !default
468468
$button-font-size : 14px !default
469-
$button-line-height : 1.718em !default
469+
$button-line-height : 1.625em !default
470470
$button-font-weight : 500 !default
471471
$button-shadow : $shadow-2 !default
472472
$button-shadow-active : $shadow-5 !default

ui/src/css/variables.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ $button-padding ?= 4px 16px
548548
$button-dense-padding ?= .285em
549549
$button-transition ?= $generic-hover-transition
550550
$button-font-size ?= 14px
551-
$button-line-height ?= 1.718em
551+
$button-line-height ?= 1.625em
552552
$button-font-weight ?= 500
553553
$button-shadow ?= $shadow-2
554554
$button-shadow-active ?= $shadow-5

0 commit comments

Comments
 (0)