Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dropshadows to the latest guidelines #724 #735

Closed
wants to merge 11 commits into from
15 changes: 8 additions & 7 deletions docs/pages/styling/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
@import '~kolibri-design-system/lib/styles/definitions'

.box {
@extend %dropshadow-4dp;
@extend %dropshadow-2dp;

border-radius: $radius;
text-align: center;
Expand Down Expand Up @@ -105,7 +105,7 @@
@import '~kolibri-design-system/lib/styles/definitions'

.more-shadow {
@extend %dropshadow-12dp;
@extend %dropshadow-6dp;
}
</DocsShowCode>
<!-- eslint-enable -->
Expand Down Expand Up @@ -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;
Expand All @@ -181,9 +181,10 @@
<style lang="scss" scoped>

@import '~~/lib/styles/definitions';


.box {
@extend %dropshadow-4dp;
@extend %dropshadow-2dp;

display: inline-block;
min-width: 150px;
Expand All @@ -195,17 +196,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;
Expand Down
4 changes: 2 additions & 2 deletions lib/KBreadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@


<style lang="scss" scoped>

@import './styles/definitions';
$crumb-max-width: 300px;

Expand Down Expand Up @@ -318,7 +318,7 @@
}

.breadcrumbs-dropdown {
@extend %dropshadow-8dp;
@extend %dropshadow-2dp;

position: absolute;
z-index: 8;
Expand Down
2 changes: 1 addition & 1 deletion lib/KCard/BaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@


<style lang="scss" scoped>

@import '../styles/definitions';

.base-card {
Expand Down
4 changes: 2 additions & 2 deletions lib/KModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@


<style lang="scss" scoped>

@import './styles/definitions';

.modal-overlay {
Expand All @@ -391,7 +391,7 @@

// TODO: margins for stacked buttons.
.modal {
@extend %dropshadow-16dp;
@extend %dropshadow-6dp;

position: absolute;
top: 50%;
Expand Down
2 changes: 1 addition & 1 deletion lib/KPageContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@


<style lang="scss" scoped>

@import './styles/definitions';

.page-container {
Expand Down
3 changes: 2 additions & 1 deletion lib/KSelect/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@
}

.ui-select-dropdown {
@extend %dropshadow-2dp;
position: absolute;
z-index: $z-index-dropdown;
display: block;
Expand All @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions lib/KSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@


<style lang="scss">

@import './styles/definitions';
$k-switch-height: 32px !default;
$k-switch-thumb-size: 20px !default;
$k-switch-thumb-color: #f5f5f5 !default;
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions lib/keen/UiAutocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
</script>

<style lang="scss">

@import '../styles/definitions';
@import './styles/imports';

.ui-autocomplete {
Expand Down Expand Up @@ -600,6 +600,7 @@
}

.ui-autocomplete__suggestions {
@extend %dropshadow-1dp;
position: absolute;
z-index: $z-index-dropdown;
display: block;
Expand All @@ -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 {
Expand Down
8 changes: 5 additions & 3 deletions lib/keen/UiButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
</script>

<style lang="scss">

@import '../styles/definitions';
@import './styles/imports';

.ui-button {
Expand Down Expand Up @@ -261,12 +261,14 @@
}

&.is-raised {
box-shadow: 0 0 2px rgba(black, 0.12), 0 2px 2px rgba(black, 0.2);
@extend %dropshadow-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 %dropshadow-2dp;
//box-shadow: 0 0 5px rgba(black, 0.22), 0 3px 6px rgba(black, 0.3);
}
}

Expand Down
8 changes: 5 additions & 3 deletions lib/keen/UiMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<style lang="scss">

/* stylelint-disable */

@import '../styles/definitions';
@import './styles/imports';

.ui-menu {
Expand All @@ -145,9 +145,11 @@
outline: none;

&.is-raised {
@extend %dropshadow-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 {
Expand Down
7 changes: 4 additions & 3 deletions lib/keen/UiPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,15 @@
<style lang="scss">

/* stylelint-disable */

@import '../styles/definitions';
@import './styles/imports';
//@import './styles/tippy/tippy';

.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 %dropshadow-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 {
Expand Down
5 changes: 3 additions & 2 deletions lib/keen/UiSnackbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@
<style lang="scss" scoped>

/* stylelint-disable */

@import '../styles/definitions';
@import './styles/imports';

$ui-snackbar-background-color: #323232 !default;
$ui-snackbar-font-size: rem(14px) !default;

.ui-snackbar {
@extend %dropshadow-2dp;
@include font-family-noto;

display: inline-flex;
Expand All @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions lib/keen/UiToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</script>

<style lang="scss">

@import '../styles/definitions';
@import './styles/imports';

$ui-toolbar-font-size: rem(18px) !default;
Expand All @@ -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 %dropshadow-2dp;
// box-shadow: 0 0 2px rgba(black, 0.12), 0 2px 2px rgba(black, 0.2);
}

&:not(.is-raised).ui-toolbar--type-default {
Expand Down
Loading