Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Add brand colors and xlarge padding token and increase logo clearspace #791

Merged
merged 1 commit into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog/unreleased/brand-and-interaction-colors
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Enhancement: Bring oC primary brand and interaction colors

We've brought the ownCloud corporate identity brand and interaction colors.
The primary brand colour is used as a background in the sidebar.
Interaction colours are used in buttons and links.

https://github.com/owncloud/owncloud-design-system/issues/546
https://github.com/owncloud/owncloud-design-system/pull/791
7 changes: 7 additions & 0 deletions changelog/unreleased/improved-buttons
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: Improve the design of buttons

We've added border-radius to buttons, added shadow to the primary button and adjusted font-weight and padding.

https://github.com/owncloud/owncloud-design-system/issues/784
https://github.com/owncloud/owncloud-design-system/issues/777
https://github.com/owncloud/owncloud-design-system/pull/791
7 changes: 7 additions & 0 deletions changelog/unreleased/logo-clearspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: Increase the logo clearspace

We've increased the gutter between top corner of the sidebar and the logo.
We've also decreased the size of the logo itself.

https://github.com/owncloud/owncloud-design-system/issues/786
https://github.com/owncloud/owncloud-design-system/pull/791
6 changes: 6 additions & 0 deletions changelog/unreleased/oc-ci-font
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Use Source Sans Pro

We've started using Source Sans Pro in the default theme as the font.

https://github.com/owncloud/owncloud-design-system/issues/785
https://github.com/owncloud/owncloud-design-system/pull/791
7 changes: 1 addition & 6 deletions src/elements/OcButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:disabled="disabled"
@click="onClick"
>
<oc-icon v-if="icon" :class="$_ocButton_iconClass" :name="icon" />
<oc-icon v-if="icon" :name="icon" />
<span v-if="$slots.default">
<slot name="default" />
</span>
Expand Down Expand Up @@ -135,11 +135,6 @@ export default {
},
},
computed: {
$_ocButton_iconClass() {
return this.$slots.default
? "uk-position-small uk-position-center-left"
: "uk-position-center"
},
$_ocButton_buttonClass() {
if (this.stopClassPropagation) return ""

Expand Down
2 changes: 2 additions & 0 deletions src/styles/theme/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ $navbar-nav-item-height: 60px;

// Transition durations
$transition-duration-short: 200ms;

$global-font-family: 'Source Sans Pro', sans-serif;
103 changes: 97 additions & 6 deletions src/styles/theme/oc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,39 @@
// ========================================================================

@mixin hook-button() {
text-transform: uppercase;
display: inline-flex;
flex-flow: row wrap;
border-radius: 3px;
padding: 0.5rem 0.75rem;
font-size: 1.125rem;
font-weight: 600;
line-height: 1.4;
justify-content: center;
align-items: center;
transition:
background-color $transition-duration-short ease-in-out,
color $transition-duration-short ease-in-out,
border-color $transition-duration-short ease-in-out;
}

@mixin hook-button-disabled() {
border-color: lighten($global-muted-color, 25%);
color: lighten($global-muted-color, 25%);

.oc-icon > svg {
fill: lighten($global-muted-color, 25%);
}

// Workaround for preventing hover effects on disabled buttons
&:hover,
&:focus {
border-color: lighten($global-muted-color, 25%);
color: lighten($global-muted-color, 25%);

.oc-icon > svg {
fill: lighten($global-muted-color, 25%);
}
}
}

//
Expand All @@ -24,13 +50,11 @@
position: relative;

.oc-icon + span {
margin-left: $global-margin;
margin-left: $small-margin;
}

text-transform: none !important;

&:not(.uk-button-small):not(.uk-button-large):not(.uk-button-raw) {
min-height: $global-control-height;
.oc-icon > svg {
transition: fill $transition-duration-short ease-in-out;
}

&.uk-button-small {
Expand All @@ -39,6 +63,7 @@

&.uk-button-large {
min-height: $global-control-large-height;
font-size: 1.5rem;
}

&.uk-button-primary,
Expand All @@ -48,6 +73,72 @@
fill: $global-inverse-color;
}
}

&.uk-button-default {
border: 1px solid $action-primary;
background-color: transparent;
color: $action-primary;

.oc-icon > svg {
fill: $action-primary;
}

&:hover,
&:focus {
border-color: $action-primary-hover;
color: $action-primary-hover;

.oc-icon > svg {
fill: $action-primary-hover;
}
}
}

&.uk-button-primary {
background-color: $action-primary;
box-shadow: 0 4px 6px rgba($shadow-action-primary, 0.11), 0 1px 3px rgba($shadow-global, 0.08);
color: white;

&:hover,
&:focus {
background-color: $action-primary-hover;
}
}

.uk-button-group & {
border-radius: 0;
// Prevent negative margin which is coming from UIkit
margin-left: 0 !important;

&:first-of-type {
border-radius: 3px 0 0 3px;
}

&:last-of-type {
border-radius: 0 3px 3px 0;
}

&.uk-button-default {
border-left: none;
border-right: none;

&:first-of-type {
border-left: 1px solid $action-primary;
}

&:last-of-type {
border-right: 1px solid $action-primary;
}
}

&.uk-button-primary {
box-shadow: none;
}
}

&:not(.uk-button-small):not(.uk-button-large):not(.uk-button-raw) {
min-height: $global-control-height;
}
}

.oc-button.uk-button-raw {
Expand Down
21 changes: 10 additions & 11 deletions src/styles/theme/oc-sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
width: $width-medium;
height: 100vh;
max-height: 100vh;
padding: $gutter 0;
background-color: $primary-background;
padding: $large-gutter 0 $gutter;
background-color: $brand-primary;
overflow: hidden auto;
box-sizing: border-box;

Expand All @@ -26,7 +26,7 @@
}

&-img {
@extend .uk-width-small;
height: $height-small;
}

&-text {
Expand All @@ -53,7 +53,7 @@

&:hover,
&:focus {
background-color: darken($primary-background, 5);
background-color: lighten($brand-primary, 5);
}

& > a,
Expand All @@ -65,6 +65,8 @@
display: flex;
flex-flow: row wrap;
padding: $small-gutter;
font-size: 1.125rem;
font-weight: 600;
align-items: center;

&:hover,
Expand All @@ -78,14 +80,11 @@
}

&.uk-active {
background-color: darken($primary-background, 5);
background-color: lighten($brand-primary, 5);

& > a {
font-weight: bold;

&:hover {
cursor: default;
}
// Vue doesn't allow navigating to active route so we do not use pointer as it might mislead users
& > a:hover {
cursor: default;
}
}
}
Expand Down
24 changes: 22 additions & 2 deletions src/tokens/color.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ props:
value: "#667fa3"
category: "Font-colors"
link-color:
value: "#0066ff"
value: "#4e85c8"
category: "Font-colors"
link-hover-color:
value: "#0066ff"
value: "#306db5"
category: "Font-colors"
inverse-color:
value: "#fff"
Expand Down Expand Up @@ -69,6 +69,26 @@ props:
value: "#e00000"
category: "Background-colors"

brand-primary:
value: "#1b223d"
category: "Brand-colors"

action-primary:
value: "#4e85c8"
category: "Action-colors"

action-primary-hover:
value: "#306db5"
category: "Action-colors"

shadow-global:
value: "#000000"
category: "Shadow-colors"

shadow-action-primary:
value: "#32325d"
category: "Shadow-colors"

global:
type: color
category: color
3 changes: 3 additions & 0 deletions src/tokens/paddings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ props:
medium-gutter:
value: "30px"
large-gutter:
value: "50px"
xlarge-gutter:
value: "70px"

global:
type: number
category: space
3 changes: 3 additions & 0 deletions src/tokens/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ props:
width-medium:
value: "300px"

height-small:
value: "50px"

global:
type: number
category: size