Browse Source

Card styles adjusted to be remove solid border shadow

pull/2053/head
jlukic 9 years ago
parent
commit
f5f8d0dbe1
2 changed files with 60 additions and 44 deletions
  1. 81
      src/definitions/views/card.less
  2. 23
      src/themes/default/views/card.variables

81
src/definitions/views/card.less

@ -435,6 +435,14 @@
Link Link
--------------------*/ --------------------*/
.ui.cards a.card,
.ui.link.cards .card,
a.ui.card,
.ui.link.card {
transform: none;
}
.ui.cards a.card:hover, .ui.cards a.card:hover,
.ui.link.cards .card:hover, .ui.link.cards .card:hover,
a.ui.card:hover, a.ui.card:hover,
@ -444,6 +452,7 @@ a.ui.card:hover,
background: @linkHoverBackground; background: @linkHoverBackground;
border: @linkHoverBorder; border: @linkHoverBorder;
box-shadow: @linkHoverBoxShadow; box-shadow: @linkHoverBoxShadow;
transform: @linkHoverTransform;
} }
/*------------------- /*-------------------
@ -454,72 +463,72 @@ a.ui.card:hover,
.ui.cards > .black.card, .ui.cards > .black.card,
.ui.black.card { .ui.black.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @black,
@borderShadow
0px @coloredShadowDistance 0px 0px @black,
@shadowBoxShadow
; ;
} }
.ui.blue.cards > .card, .ui.blue.cards > .card,
.ui.cards > .blue.card, .ui.cards > .blue.card,
.ui.blue.card { .ui.blue.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @blue,
@borderShadow
0px @coloredShadowDistance 0px 0px @blue,
@shadowBoxShadow
; ;
} }
.ui.green.cards > .card, .ui.green.cards > .card,
.ui.cards > .green.card, .ui.cards > .green.card,
.ui.green.card { .ui.green.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @green,
@borderShadow
0px @coloredShadowDistance 0px 0px @green,
@shadowBoxShadow
; ;
} }
.ui.orange.cards > .card, .ui.orange.cards > .card,
.ui.cards > .orange.card, .ui.cards > .orange.card,
.ui.orange.card { .ui.orange.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @orange,
@borderShadow
0px @coloredShadowDistance 0px 0px @orange,
@shadowBoxShadow
; ;
} }
.ui.pink.cards > .card, .ui.pink.cards > .card,
.ui.cards > .pink.card, .ui.cards > .pink.card,
.ui.pink.card { .ui.pink.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @pink,
@borderShadow
0px @coloredShadowDistance 0px 0px @pink,
@shadowBoxShadow
; ;
} }
.ui.purple.cards > .card, .ui.purple.cards > .card,
.ui.cards > .purple.card, .ui.cards > .purple.card,
.ui.purple.card { .ui.purple.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @purple,
@borderShadow
0px @coloredShadowDistance 0px 0px @purple,
@shadowBoxShadow
; ;
} }
.ui.red.cards > .card, .ui.red.cards > .card,
.ui.cards > .red.card, .ui.cards > .red.card,
.ui.red.card { .ui.red.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @red,
@borderShadow
0px @coloredShadowDistance 0px 0px @red,
@shadowBoxShadow
; ;
} }
.ui.teal.cards > .card, .ui.teal.cards > .card,
.ui.cards > .teal.card, .ui.cards > .teal.card,
.ui.teal.card { .ui.teal.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @teal,
@borderShadow
0px @coloredShadowDistance 0px 0px @teal,
@shadowBoxShadow
; ;
} }
.ui.yellow.cards > .card, .ui.yellow.cards > .card,
.ui.cards > .yellow.card, .ui.cards > .yellow.card,
.ui.yellow.card { .ui.yellow.card {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @yellow,
@borderShadow
0px @coloredShadowDistance 0px 0px @yellow,
@shadowBoxShadow
; ;
} }
@ -528,72 +537,72 @@ a.ui.card:hover,
.ui.cards > .black.card:hover, .ui.cards > .black.card:hover,
.ui.black.card:hover { .ui.black.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @blackHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @blackHover,
@shadowHoverBoxShadow
; ;
} }
.ui.blue.cards > .card:hover, .ui.blue.cards > .card:hover,
.ui.cards > .blue.card:hover, .ui.cards > .blue.card:hover,
.ui.blue.card:hover { .ui.blue.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @blueHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @blueHover,
@shadowHoverBoxShadow
; ;
} }
.ui.green.cards > .card:hover, .ui.green.cards > .card:hover,
.ui.cards > .green.card:hover, .ui.cards > .green.card:hover,
.ui.green.card:hover { .ui.green.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @greenHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @greenHover,
@shadowHoverBoxShadow
; ;
} }
.ui.orange.cards > .card:hover, .ui.orange.cards > .card:hover,
.ui.cards > .orange.card:hover, .ui.cards > .orange.card:hover,
.ui.orange.card:hover { .ui.orange.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @orangeHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @orangeHover,
@shadowHoverBoxShadow
; ;
} }
.ui.pink.cards > .card:hover, .ui.pink.cards > .card:hover,
.ui.cards > .pink.card:hover, .ui.cards > .pink.card:hover,
.ui.pink.card:hover { .ui.pink.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @pinkHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @pinkHover,
@shadowHoverBoxShadow
; ;
} }
.ui.purple.cards > .card:hover, .ui.purple.cards > .card:hover,
.ui.cards > .purple.card:hover, .ui.cards > .purple.card:hover,
.ui.purple.card:hover { .ui.purple.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @purpleHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @purpleHover,
@shadowHoverBoxShadow
; ;
} }
.ui.red.cards > .card:hover, .ui.red.cards > .card:hover,
.ui.cards > .red.card:hover, .ui.cards > .red.card:hover,
.ui.red.card:hover { .ui.red.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @redHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @redHover,
@shadowHoverBoxShadow
; ;
} }
.ui.teal.cards > .card:hover, .ui.teal.cards > .card:hover,
.ui.cards > .teal.card:hover, .ui.cards > .teal.card:hover,
.ui.teal.card:hover { .ui.teal.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @tealHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @tealHover,
@shadowHoverBoxShadow
; ;
} }
.ui.yellow.cards > .card:hover, .ui.yellow.cards > .card:hover,
.ui.cards > .yellow.card:hover, .ui.cards > .yellow.card:hover,
.ui.yellow.card:hover { .ui.yellow.card:hover {
box-shadow: box-shadow:
0px @shadowDistance 0px 0px @yellowHover,
@borderShadow
0px @coloredShadowDistance 0px 0px @yellowHover,
@shadowHoverBoxShadow
; ;
} }

23
src/themes/default/views/card.variables

@ -7,8 +7,8 @@
--------------------*/ --------------------*/
/* Shadow */ /* Shadow */
@shadowDistance: 3px;
@shadowBoxShadow: 0px @shadowDistance 0px 0px @solidBorderColor;
@shadowDistance: 1px;
@shadowBoxShadow: 0px @shadowDistance 3px 0px @solidBorderColor;
/* Card */ /* Card */
@display: flex; @display: flex;
@ -26,7 +26,10 @@
; ;
@border: none; @border: none;
@zIndex: ''; @zIndex: '';
@transition: box-shadow @transitionDuration @transitionEasing;
@transition:
box-shadow @transitionDuration @transitionEasing,
transform @transitionDuration @transitionEasing
;
/* Card Group */ /* Card Group */
@horizontalSpacing: 1em; @horizontalSpacing: 1em;
@ -66,8 +69,7 @@
/* Header */ /* Header */
@headerMargin: 0em; @headerMargin: 0em;
@headerFontWeight: bold; @headerFontWeight: bold;
@headerFontSize: 1.2em;
@headerLineHeight: 1.33em;
@headerFontSize: @relativeBig;
@headerLineHeightOffset: -(@lineHeight - 1em) / 2; @headerLineHeightOffset: -(@lineHeight - 1em) / 2;
@headerColor: @darkTextColor; @headerColor: @darkTextColor;
@ -146,11 +148,13 @@
@linkHoverBackground: ''; @linkHoverBackground: '';
@linkHoverBorder: none; @linkHoverBorder: none;
@linkHoverZIndex: 5; @linkHoverZIndex: 5;
@linkHoverRaiseDistance: 3px;
@linkHoverTransform: translateY(-@linkHoverRaiseDistance);
@shadowHoverBoxShadow: 0px @shadowDistance 0px 0px @solidSelectedBorderColor;
@shadowHoverBoxShadow: 0px @shadowDistance @linkHoverRaiseDistance 0px @solidSelectedBorderColor;
@linkHoverBoxShadow: @linkHoverBoxShadow:
@shadowHoverBoxShadow, @shadowHoverBoxShadow,
0px 0px 0px 1px @selectedBorderColor
0px 0px 0px @borderWidth @borderColor
; ;
/* Card Count */ /* Card Count */
@ -196,4 +200,7 @@
@stackableMargin: ~"calc("@oneColumn~" - "(@stackableCardSpacing * 2)~")"; @stackableMargin: ~"calc("@oneColumn~" - "(@stackableCardSpacing * 2)~")";
/* Sizes */ /* Sizes */
@medium: 1em;
@medium: 1em;
/* Colored */
@coloredShadowDistance: 2px;
Loading…
Cancel
Save