Skip to content
Snippets Groups Projects
Commit 5f4dbb17 authored by Ekaterina Kondareva's avatar Ekaterina Kondareva
Browse files

merged with dev; resolving conflicts

parents c08c3ca9 84923dfc
No related branches found
No related tags found
No related merge requests found
{ {
"name": "@itcenteratunihelsinki/huds-lib", "name": "@itcenteratunihelsinki/huds-lib",
"version": "0.0.52", "version": "0.0.53",
"description": "Helsinki University Design System library", "description": "Helsinki University Design System library",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.mjs", "module": "dist/index.mjs",
......
...@@ -9,14 +9,15 @@ ...@@ -9,14 +9,15 @@
// Mobile. // Mobile.
:host(.hy-menu-item--mobile) { :host(.hy-menu-item--mobile) {
background-color: var(--grayscale-white);
border-top: 1px dashed var(--grayscale-medium-dark);
display: flex;
--menu-item-display: flex; --menu-item-display: flex;
} display: flex;
margin-left: 12px;
margin-right: 12px;
margin: 0 12px 5px;
:host(.hy-menu-item--mobile:first-of-type) { @include breakpoint($narrow) {
border-top: 3px solid var(--brand-main-nearly-black); margin: 0 28px 6px;
}
} }
:host(.hy-menu-item--mobile.hy-menu-item--alternative) { :host(.hy-menu-item--mobile.hy-menu-item--alternative) {
...@@ -147,18 +148,50 @@ a { ...@@ -147,18 +148,50 @@ a {
outline-offset: -2px; outline-offset: -2px;
} }
&.is-active, &.hy-menu-item--mobile {
&.in-active-trail { background: linear-gradient(270deg, var(--grayscale-background-box) 0%, var(--grayscale-light) 100%);
.hy-menu-item__label { color: var(--brand-main-light);
border-bottom: 2px solid var(--additional-orange); padding: 12px 12px 12px 20px;
padding-bottom: 5px;
&.is-active,
&.in-active-trail {
@include font-weight($bold);
color: var(--grayscale-black);
position: relative;
&:before {
border-left: 3px solid var(--grayscale-black);
content: '';
height: 75%;
left: 10px;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}
} }
}
&.is-active, &.is-heading {
&.is-heading { @include font-size(24px, 24px);
.hy-menu-item__label {
@include font-weight($bold); @include font-weight($bold);
background: transparent;
border-bottom: 3px solid var(--brand-main-light);
color: var(--brand-main-light);
margin-top: -24px;
padding-bottom: 24px;
padding-top: 24px;
text-transform: uppercase;
&.is-active,
&.in-active-trail {
@include font-weight($bold);
color: var(--grayscale-black);
position: relative;
&:before {
border-left-width: 4px;
height: 55%;
}
}
} }
} }
...@@ -304,24 +337,18 @@ a { ...@@ -304,24 +337,18 @@ a {
.hy-menu-item__button { .hy-menu-item__button {
align-items: center; align-items: center;
background: transparent; background: linear-gradient(270deg, var(--grayscale-background-box) 0%, var(--grayscale-light) 100%);
border: 0 none; border-bottom: 0;
border-left: 1px dashed var(--brand-main-light);
border-right: 0;
border-top: 0;
cursor: pointer; cursor: pointer;
display: var(--menu-item-display); display: var(--menu-item-display);
justify-content: center; justify-content: center;
width: 70px; padding: 0;
width: 50px;
&:focus {
outline: solid 2px var(--additional-yellow);
outline-offset: 2px;
}
&::before { svg {
border-left: 1px dashed var(--brand-main-nearly-black); fill: var(--brand-main-light);
content: '';
display: block;
height: 16px;
margin-right: 16px;
width: 1px;
} }
} }
...@@ -3,8 +3,12 @@ ...@@ -3,8 +3,12 @@
display: flex; display: flex;
flex-flow: row; flex-flow: row;
position: absolute; position: absolute;
right: 0; right: 16px;
top: 0; top: 0;
@include breakpoint($narrow) {
right: 28px;
}
} }
:host(.menu--language:not([is-mobile])) { :host(.menu--language:not([is-mobile])) {
......
...@@ -98,6 +98,10 @@ export class MenuLevelContainer { ...@@ -98,6 +98,10 @@ export class MenuLevelContainer {
...this.headingItem, ...this.headingItem,
label: parentMenuItem.getAttribute('label'), label: parentMenuItem.getAttribute('label'),
}; };
this.headingItem = {
...this.headingItem,
isActive: window.location.pathname === this.headingItem.url,
};
} else { } else {
this.triggerItem = 'home'; this.triggerItem = 'home';
} }
...@@ -150,6 +154,7 @@ export class MenuLevelContainer { ...@@ -150,6 +154,7 @@ export class MenuLevelContainer {
label={this.headingItem.label} label={this.headingItem.label}
url={this.headingItem.url} url={this.headingItem.url}
isHeading={true} isHeading={true}
isActive={this.headingItem.isActive}
menu-type={'mobile'} menu-type={'mobile'}
/> />
<slot /> <slot />
......
...@@ -4,18 +4,27 @@ ...@@ -4,18 +4,27 @@
border: 0 none; border: 0 none;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
margin: 0 0 15px; margin: 0 0 24px 16px;
padding: 0; padding: 0;
@include breakpoint($narrow) {
margin: 0 0 24px 28px;
}
&:focus { &:focus {
outline: solid 2px var(--additional-yellow); outline: solid 2px var(--additional-yellow);
outline-offset: 2px; outline-offset: 2px;
} }
svg {
fill: var(--brand-main-light);
}
&__label { &__label {
@include font-size(14px, 20px); @include font-size(14px, 20px);
@include font-weight($regular); @include font-weight($regular);
align-items: center; align-items: center;
color: var(--brand-main-light);
display: flex; display: flex;
margin-left: 6px; margin-left: 6px;
text-align: left; text-align: left;
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
flex-flow: column; flex-flow: column;
justify-items: stretch; justify-items: stretch;
left: 0; left: 0;
padding: 20px 32px 0;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
...@@ -36,11 +35,13 @@ ...@@ -36,11 +35,13 @@
.hy-menu { .hy-menu {
&--mobile { &--mobile {
-webkit-overflow-scrolling: touch;
flex-flow: column; flex-flow: column;
min-height: calc(100vh - 60px); min-height: calc(100vh - 60px);
-webkit-overflow-scrolling: touch;
overflow-x: hidden; overflow-x: hidden;
overflow-y: visible; overflow-y: visible;
padding-left: 12px;
padding-right: 12px;
transform: translateX(100%); transform: translateX(100%);
transition: 0.45s; transition: 0.45s;
width: 100%; width: 100%;
...@@ -73,7 +74,11 @@ ...@@ -73,7 +74,11 @@
&__logo-container { &__logo-container {
display: inline-block; display: inline-block;
margin: 5px 0 20px; padding: 16px;
@include breakpoint($narrow) {
padding: 16px 28px;
}
} }
&--sidenav { &--sidenav {
...@@ -87,24 +92,28 @@ ...@@ -87,24 +92,28 @@
} }
.hy-link__donate { .hy-link__donate {
align-items: center; background-color: var(--grayscale-white);
background-color: var(--brand-main);
bottom: -20px; bottom: -20px;
display: flex;
justify-content: center;
letter-spacing: -0.5px;
margin: auto -20px 0;
padding: 20px;
position: sticky; position: sticky;
z-index: 102; z-index: 102;
a { a {
@include font-size(15px, 20px); @include font-size(16px, 16px);
@include font-weight($semibold); @include font-weight($semibold);
background-color: var(--brand-main-light);
color: var(--grayscale-white); color: var(--grayscale-white);
display: block;
font-family: var(--main-font-family); font-family: var(--main-font-family);
letter-spacing: -0.4px;
margin: 12px;
padding: 20px;
text-align: center;
text-decoration: none; text-decoration: none;
@include breakpoint($narrow) {
margin: 12px 28px;
}
&:focus { &:focus {
outline: solid 2px var(--additional-yellow); outline: solid 2px var(--additional-yellow);
outline-offset: 4px; outline-offset: 4px;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
margin: 16px 8px; margin: 16px 8px;
@include breakpoint($narrow) { @include breakpoint($narrow) {
margin: 16px 16px 16px 24px; margin: 16px 16px 16px 28px;
} }
@include breakpoint($wide) { @include breakpoint($wide) {
...@@ -70,8 +70,8 @@ ...@@ -70,8 +70,8 @@
width: 90%; width: 90%;
z-index: 100; z-index: 100;
@include breakpoint($medium) { @include breakpoint($narrow) {
width: 356px; width: 400px;
} }
} }
} }
...@@ -82,16 +82,19 @@ ...@@ -82,16 +82,19 @@
padding: 15px 16px 15px 12px; padding: 15px 16px 15px 12px;
@include breakpoint($narrow) { @include breakpoint($narrow) {
padding: 15px 32px 15px 10px; padding: 15px 28px 15px 10px;
} }
&.is-open { &.is-open {
margin: 10px;
padding: 10px;
position: absolute; position: absolute;
right: 0; right: 0;
top: 17px; top: 32px;
transform: translateY(-50%);
z-index: 101; z-index: 101;
@include breakpoint($narrow) {
top: 40px;
}
} }
&__label { &__label {
...@@ -111,13 +114,8 @@ ...@@ -111,13 +114,8 @@
svg { svg {
height: 24px; height: 24px;
margin-left: 4px;
width: 24px; width: 24px;
@include breakpoint($narrow) {
margin-left: 8px;
}
@include breakpoint($medium) { @include breakpoint($medium) {
width: 20px; width: 20px;
} }
......
...@@ -27,6 +27,13 @@ a { ...@@ -27,6 +27,13 @@ a {
margin-left: 8px; margin-left: 8px;
max-width: 100%; max-width: 100%;
text-transform: uppercase; text-transform: uppercase;
max-width: 90px;
.hy-site-header__logo-container & {
@include breakpoint($narrow) {
max-width: none;
}
}
@include breakpoint($narrow) { @include breakpoint($narrow) {
@include font-size(15px, 16px); @include font-size(15px, 16px);
......
...@@ -4,7 +4,7 @@ import {ColorVariant, SiteLogoSize} from '../../../utils/utils'; ...@@ -4,7 +4,7 @@ import {ColorVariant, SiteLogoSize} from '../../../utils/utils';
@Component({ @Component({
tag: 'hy-site-logo', tag: 'hy-site-logo',
styleUrl: 'site-logo.scss', styleUrl: 'site-logo.scss',
shadow: true, shadow: false,
}) })
export class SiteLogo { export class SiteLogo {
@Prop() color: ColorVariant = ColorVariant.black; @Prop() color: ColorVariant = ColorVariant.black;
......
...@@ -33,16 +33,16 @@ ...@@ -33,16 +33,16 @@
&__label { &__label {
@include font-size(14px, 14px); @include font-size(14px, 14px);
@include font-weight($bold); @include font-weight($bold);
color: var(--site-logo-color); color: var(--site-logo-color);
display: none; display: none;
display: none;
font-family: var(--main-font-family); font-family: var(--main-font-family);
letter-spacing: -0.9px; letter-spacing: -0.9px;
margin-left: 4px; margin-left: 4px;
visibility: hidden;
@include breakpoint($narrow) { @include breakpoint($narrow) {
@include font-size(15px, 16px); @include font-size(15px, 16px);
display: block;
margin-left: 4px; margin-left: 4px;
margin-right: 8px; margin-right: 8px;
text-transform: uppercase; text-transform: uppercase;
...@@ -50,8 +50,10 @@ ...@@ -50,8 +50,10 @@
@include breakpoint($wide) { @include breakpoint($wide) {
@include font-size(14px); @include font-size(14px);
display: block;
font-weight: 600; font-weight: 600;
text-transform: none; text-transform: none;
visibility: visible;
} }
@include breakpoint($extrawide) { @include breakpoint($extrawide) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment