From e6b032ad337d9504654201db8e854b2d6a928b36 Mon Sep 17 00:00:00 2001 From: lokesh-sagi125 Date: Mon, 19 Aug 2024 12:14:08 +0530 Subject: [PATCH 01/11] updated drop shadow according to the latest guidelines replaced redundant dropshadows with most relavent version out of dropshadow(1,2,6) --- docs/pages/styling/index.vue | 14 +++++++------- lib/KBreadcrumbs.vue | 2 +- lib/KModal.vue | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pages/styling/index.vue b/docs/pages/styling/index.vue index 919d5ad54..a1099baac 100644 --- a/docs/pages/styling/index.vue +++ b/docs/pages/styling/index.vue @@ -38,7 +38,7 @@ @import '~kolibri-design-system/lib/styles/definitions' .box { - @extend %dropshadow-4dp; + @extend %dropshadow-2dp; border-radius: $radius; text-align: center; @@ -105,7 +105,7 @@ @import '~kolibri-design-system/lib/styles/definitions' .more-shadow { - @extend %dropshadow-12dp; + @extend %dropshadow-6dp; } @@ -155,7 +155,7 @@ @import '~kolibri-design-system/lib/styles/definitions' .ease:hover { - @extend %dropshadow-8dp; + @extend %dropshadow-6dp; @extend %md-standard-func; cursor: pointer; @@ -183,7 +183,7 @@ @import '~~/lib/styles/definitions'; .box { - @extend %dropshadow-4dp; + @extend %dropshadow-2dp; display: inline-block; min-width: 150px; @@ -195,17 +195,17 @@ } .more-shadow { - @extend %dropshadow-12dp; + @extend %dropshadow-6dp; } .immediate:hover { - @extend %dropshadow-8dp; + @extend %dropshadow-6dp; cursor: pointer; } .ease:hover { - @extend %dropshadow-8dp; + @extend %dropshadow-6dp; @extend %md-standard-func; cursor: pointer; diff --git a/lib/KBreadcrumbs.vue b/lib/KBreadcrumbs.vue index 72c746152..d9342b87d 100644 --- a/lib/KBreadcrumbs.vue +++ b/lib/KBreadcrumbs.vue @@ -318,7 +318,7 @@ } .breadcrumbs-dropdown { - @extend %dropshadow-8dp; + @extend %-2dp; position: absolute; z-index: 8; diff --git a/lib/KModal.vue b/lib/KModal.vue index 1112d86e7..8afb41442 100644 --- a/lib/KModal.vue +++ b/lib/KModal.vue @@ -391,7 +391,7 @@ // TODO: margins for stacked buttons. .modal { - @extend %dropshadow-16dp; + @extend %-16dp; position: absolute; top: 50%; From a3598eef3cd5d8189a761b784ea954535e60970a Mon Sep 17 00:00:00 2001 From: lokesh-sagi125 Date: Mon, 19 Aug 2024 12:20:27 +0530 Subject: [PATCH 02/11] Update KBreadcrumbs.vue --- lib/KBreadcrumbs.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/KBreadcrumbs.vue b/lib/KBreadcrumbs.vue index d9342b87d..6e7416111 100644 --- a/lib/KBreadcrumbs.vue +++ b/lib/KBreadcrumbs.vue @@ -318,7 +318,7 @@ } .breadcrumbs-dropdown { - @extend %-2dp; + @extend %dropshadow-2dp; position: absolute; z-index: 8; From 35d118195d39383a40f5adb8eb04d23c37994a81 Mon Sep 17 00:00:00 2001 From: lokesh-sagi125 Date: Mon, 19 Aug 2024 12:30:17 +0530 Subject: [PATCH 03/11] Update KModal.vue --- lib/KModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/KModal.vue b/lib/KModal.vue index 8afb41442..c5a781d12 100644 --- a/lib/KModal.vue +++ b/lib/KModal.vue @@ -391,7 +391,7 @@ // TODO: margins for stacked buttons. .modal { - @extend %-16dp; + @extend %dropshadow-6dp; position: absolute; top: 50%; From a5ee0a4e7acebfb4729753b2f7ebca2dbaac111b Mon Sep 17 00:00:00 2001 From: lokesh-sagi125 Date: Mon, 19 Aug 2024 16:20:47 +0530 Subject: [PATCH 04/11] Update UiSnackbar.vue --- lib/keen/UiSnackbar.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/keen/UiSnackbar.vue b/lib/keen/UiSnackbar.vue index 535b1354a..0282c0f10 100644 --- a/lib/keen/UiSnackbar.vue +++ b/lib/keen/UiSnackbar.vue @@ -92,6 +92,7 @@ $ui-snackbar-font-size: rem(14px) !default; .ui-snackbar { + @extend %dropshadow-2dp; @include font-family-noto; display: inline-flex; @@ -102,7 +103,7 @@ padding: rem(14px 24px); background-color: $ui-snackbar-background-color; border-radius: $ui-default-border-radius; - box-shadow: 0 1px 3px rgba(black, 0.12), 0 1px 2px rgba(black, 0.24); + //box-shadow: 0 1px 3px rgba(black, 0.12), 0 1px 2px rgba(black, 0.24); } .ui-snackbar-message { From 4bc38e6c677458dc2f0902bb5db88a851168eae9 Mon Sep 17 00:00:00 2001 From: lokesh-sagi125 Date: Mon, 19 Aug 2024 16:32:10 +0530 Subject: [PATCH 05/11] replacing the box shadow elements switched out the box shadow with appropriate drop-shadows --- lib/KSelect/index.vue | 3 ++- lib/KSwitch.vue | 3 ++- lib/keen/UiAutocomplete.vue | 3 ++- lib/keen/UiButton.vue | 6 ++++-- lib/keen/UiMenu.vue | 6 ++++-- lib/keen/UiPopover.vue | 5 +++-- lib/keen/UiToolbar.vue | 3 ++- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/KSelect/index.vue b/lib/KSelect/index.vue index c2263f4e7..88415318a 100644 --- a/lib/KSelect/index.vue +++ b/lib/KSelect/index.vue @@ -1065,6 +1065,7 @@ } .ui-select-dropdown { + @extend %boxshadow-2dp; position: absolute; z-index: $z-index-dropdown; display: block; @@ -1075,7 +1076,7 @@ margin-bottom: rem-calc(8px); list-style-type: none; outline: none; - box-shadow: 1px 2px 8px $md-grey-600; + //box-shadow: 1px 2px 8px $md-grey-600; } .ui-select-options { diff --git a/lib/KSwitch.vue b/lib/KSwitch.vue index b26052fba..79f1dd559 100644 --- a/lib/KSwitch.vue +++ b/lib/KSwitch.vue @@ -254,13 +254,14 @@ } .k-switch-thumb { + @extend %dropshadow-1dp; position: absolute; z-index: 1; width: $k-switch-thumb-size; height: $k-switch-thumb-size; background-color: $k-switch-thumb-color; border-radius: 50%; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); + //box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition-timing-function: ease; transition-duration: 0.2s; transition-property: background-color, transform; diff --git a/lib/keen/UiAutocomplete.vue b/lib/keen/UiAutocomplete.vue index 8dc23eab9..dbcea97e6 100644 --- a/lib/keen/UiAutocomplete.vue +++ b/lib/keen/UiAutocomplete.vue @@ -600,6 +600,7 @@ } .ui-autocomplete__suggestions { + @extend %dropshadow-1dp; position: absolute; z-index: $z-index-dropdown; display: block; @@ -610,7 +611,7 @@ color: $primary-text-color; list-style-type: none; background-color: white; - box-shadow: 1px 2px 8px $md-grey-600; + //box-shadow: 1px 2px 8px $md-grey-600; } .ui-autocomplete__feedback { diff --git a/lib/keen/UiButton.vue b/lib/keen/UiButton.vue index 394ae3348..d2e051a2f 100644 --- a/lib/keen/UiButton.vue +++ b/lib/keen/UiButton.vue @@ -261,12 +261,14 @@ } &.is-raised { - box-shadow: 0 0 2px rgba(black, 0.12), 0 2px 2px rgba(black, 0.2); + @extend %boxshadow-2dp; + //box-shadow: 0 0 2px rgba(black, 0.12), 0 2px 2px rgba(black, 0.2); transition: box-shadow 0.3s ease; &.has-focus-ring:focus, body[modality='keyboard'] &:focus { - box-shadow: 0 0 5px rgba(black, 0.22), 0 3px 6px rgba(black, 0.3); + @extend %boxshadow-2dp; + //box-shadow: 0 0 5px rgba(black, 0.22), 0 3px 6px rgba(black, 0.3); } } diff --git a/lib/keen/UiMenu.vue b/lib/keen/UiMenu.vue index 7da1beb51..3b0a10f01 100644 --- a/lib/keen/UiMenu.vue +++ b/lib/keen/UiMenu.vue @@ -145,9 +145,11 @@ outline: none; &.is-raised { + @extend %boxshadow-2dp; border: none; - box-shadow: 0 2px 4px -1px rgba(black, 0.2), 0 4px 5px 0 rgba(black, 0.14), - 0 1px 10px 0 rgba(black, 0.12); + + // box-shadow: 0 2px 4px -1px rgba(black, 0.2), 0 4px 5px 0 rgba(black, 0.14), + // 0 1px 10px 0 rgba(black, 0.12); } &.has-secondary-text { diff --git a/lib/keen/UiPopover.vue b/lib/keen/UiPopover.vue index da78e6a98..8a04afee1 100644 --- a/lib/keen/UiPopover.vue +++ b/lib/keen/UiPopover.vue @@ -356,8 +356,9 @@ .ui-popover { &.is-raised { - box-shadow: 0 2px 4px -1px rgba(black, 0.2), 0 4px 5px 0 rgba(black, 0.14), - 0 1px 10px 0 rgba(black, 0.12); + @extend %boxshadow-2dp; + //box-shadow: 0 2px 4px -1px rgba(black, 0.2), 0 4px 5px 0 rgba(black, 0.14), + //0 1px 10px 0 rgba(black, 0.12); } .ui-menu { diff --git a/lib/keen/UiToolbar.vue b/lib/keen/UiToolbar.vue index 7b2d5cd0f..98384a331 100644 --- a/lib/keen/UiToolbar.vue +++ b/lib/keen/UiToolbar.vue @@ -144,7 +144,8 @@ font-size: $ui-toolbar-font-size; &.is-raised { - box-shadow: 0 0 2px rgba(black, 0.12), 0 2px 2px rgba(black, 0.2); + @extend %boxshadow-2dp; + // box-shadow: 0 0 2px rgba(black, 0.12), 0 2px 2px rgba(black, 0.2); } &:not(.is-raised).ui-toolbar--type-default { From be81cead2327e71be647e5723528e1e1d29bb448 Mon Sep 17 00:00:00 2001 From: lokesh-sagi125 Date: Mon, 19 Aug 2024 23:07:39 +0530 Subject: [PATCH 06/11] added the import functions added the import functions to the files missing them --- lib/KBreadcrumbs.vue | 2 +- lib/KCard/BaseCard.vue | 2 +- lib/KModal.vue | 2 +- lib/KPageContainer.vue | 2 +- lib/KSelect/index.vue | 2 +- lib/KSwitch.vue | 2 +- lib/keen/UiAutocomplete.vue | 2 +- lib/keen/UiButton.vue | 6 +++--- lib/keen/UiMenu.vue | 4 ++-- lib/keen/UiPopover.vue | 4 ++-- lib/keen/UiSnackbar.vue | 2 +- lib/keen/UiToolbar.vue | 4 ++-- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/KBreadcrumbs.vue b/lib/KBreadcrumbs.vue index 6e7416111..a2f2d6c90 100644 --- a/lib/KBreadcrumbs.vue +++ b/lib/KBreadcrumbs.vue @@ -283,7 +283,7 @@