From fc518a3e34f4b71c6ef0be5e843cecc12eb33988 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Sun, 15 May 2016 16:07:08 -0400 Subject: [PATCH] Adds raised card varaition, darkens floating shadow slightly --- RELEASE-NOTES.md | 1 + src/definitions/views/card.less | 10 ++++++++++ src/themes/default/globals/site.variables | 8 +++++++- src/themes/default/views/card.variables | 14 +++++++++++--- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 246a2fdfe..543c66f12 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -92,6 +92,7 @@ - **Project** - NPM depenendencies have all been updated to latest stable releases - **Button** - Added variables for configuring `disabled` background image and box shadow. - **Site** - Added colored box shadow defaults. `ui message` now includes individual colored border shadows based on new site defaults. +- **Card** - Added `raised` card variation **Thanks @yoris** #2955 - **Dropdown** - Adds new setting `minCharacters` which sets the minimum number of characters required to start filtering results #3886 - **Dropdown** - Added `1px` offset for current text so that the text position cursor does not overlap first pixel of text. - **Dropdown** - Dropdown will now automatically focus on `search` inside of a menu after it is opened. diff --git a/src/definitions/views/card.less b/src/definitions/views/card.less index 74fc1ee8b..d2af801f8 100755 --- a/src/definitions/views/card.less +++ b/src/definitions/views/card.less @@ -429,7 +429,17 @@ .ui.raised.card { box-shadow: @raisedShadow; } +.ui.raised.cards a.card:hover, +.ui.link.cards .raised.card:hover, +a.ui.raised.card:hover, +.ui.link.raised.card:hover { + box-shadow: @raisedShadowHover; +} +.ui.raised.cards > .card, +.ui.raised.card { + box-shadow: @raisedShadow; +} /*------------------- Centered --------------------*/ diff --git a/src/themes/default/globals/site.variables b/src/themes/default/globals/site.variables index e5f4237e0..6609dae74 100644 --- a/src/themes/default/globals/site.variables +++ b/src/themes/default/globals/site.variables @@ -305,7 +305,7 @@ ; @floatingShadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), - 0px 2px 10px 0px rgba(34, 36, 38, 0.08) + 0px 2px 10px 0px rgba(34, 36, 38, 0.15) ; /******************************* @@ -699,6 +699,12 @@ Hover --------------------*/ +/*--- Shadows ---*/ +@floatingShadowHover: + 0px 2px 4px 0px rgba(34, 36, 38, 0.15), + 0px 2px 10px 0px rgba(34, 36, 38, 0.25) +; + /*--- Colors ---*/ @primaryColorHover : saturate(darken(@primaryColor, 5), 10, relative); @secondaryColorHover : saturate(lighten(@secondaryColor, 5), 10, relative); diff --git a/src/themes/default/views/card.variables b/src/themes/default/views/card.variables index 5df93c399..cd71b85db 100644 --- a/src/themes/default/views/card.variables +++ b/src/themes/default/views/card.variables @@ -10,9 +10,6 @@ @shadowDistance: 1px; @shadowBoxShadow: 0px @shadowDistance 3px 0px @solidBorderColor; -/* Raised Shadow */ -@raisedShadow: @floatingShadow; - /* Card */ @fontFamily: @pageFont; @display: flex; @@ -163,6 +160,17 @@ @borderShadow ; + +/* Raised */ +@raisedShadow: + @borderShadow, + @floatingShadow +; +@raisedShadowHover: + @borderShadow, + @floatingShadowHover +; + /* Card Count */ @wideCardSpacing: 1em; @cardSpacing: 0.75em;