Skip to content
Snippets Groups Projects
Commit 8af36c0d authored by shamalainen's avatar shamalainen
Browse files

Update item type indicator in mobile

parent 2494d879
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
&:hover, &:hover,
&:focus { &:focus {
.hy-general-list-item__type { .hy-general-list-item__type span {
background-color: var(--brand-main); background-color: var(--brand-main);
} }
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
position: relative; position: relative;
width: 100%; width: 100%;
@include breakpoint(max-width 479px) {
display: none;
}
@include breakpoint($narrow) { @include breakpoint($narrow) {
max-width: 35.7%; max-width: 35.7%;
} }
...@@ -67,16 +71,33 @@ ...@@ -67,16 +71,33 @@
} }
.hy-general-list-item__type { .hy-general-list-item__type {
@include font-size(12px, 14px); background-color: var(--grayscale-background-box);
@include font-weight($bold); padding-top: 16px;
background-color: var(--grayscale-black); z-index: 10;
color: #ffffff;
left: -8px; @include breakpoint($narrow) {
letter-spacing: -0.1px; background-color: transparent;
padding: 5px 8px; left: -8px;
position: absolute; padding-top: 0;
text-transform: uppercase; position: absolute;
top: 16px; top: 16px;
}
span {
@include font-size(12px, 14px);
@include font-weight($bold);
background-color: var(--grayscale-black);
color: #ffffff;
letter-spacing: -0.1px;
padding: 5px 8px;
text-transform: uppercase;
align-self: baseline;
margin-left: -8px;
@include breakpoint($narrow) {
margin-left: 0;
}
}
} }
.hy-general-list-item__text-container { .hy-general-list-item__text-container {
......
import {Component, Element, h, Listen, Prop} from '@stencil/core'; import {Component, Element, h, Prop} from '@stencil/core';
let keys = {
enter: 'Enter',
};
@Component({ @Component({
tag: 'hy-general-list-item', tag: 'hy-general-list-item',
...@@ -35,9 +31,11 @@ export class HyGeneralListItem { ...@@ -35,9 +31,11 @@ export class HyGeneralListItem {
return ( return (
<article class={classAttributes}> <article class={classAttributes}>
<a class="hy-general-list-item__link" href={this.url} target="_blank"> <a class="hy-general-list-item__link" href={this.url} target="_blank">
<div class="hy-general-list-item__type">
<span>{this.label}</span>
</div>
<figure class={imageClassAttributes} style={aspectRatio}> <figure class={imageClassAttributes} style={aspectRatio}>
<img alt={this.imageAlt} class="hy-general-list-item__image" src={this.imageUrl} /> <img alt={this.imageAlt} class="hy-general-list-item__image" src={this.imageUrl} />
<span class="hy-general-list-item__type">{this.label}</span>
</figure> </figure>
<div class={contentClassAttributes}> <div class={contentClassAttributes}>
<h3 class="hy-general-list-item__title">{this.itemTitle}</h3> <h3 class="hy-general-list-item__title">{this.itemTitle}</h3>
......
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