@uqds/card 0.1.0-alpha.0 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/main.css +1 -1
- package/package.json +4 -3
- package/src/scss/_card.scss +156 -0
- package/src/scss/_component.scss +5 -3
- package/src/scss/_custom-properties.scss +11 -0
- package/src/scss/_story-card.scss +93 -0
- package/src/scss/main.scss +3 -1
package/dist/css/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.uq-card{position:relative;display:flex;flex-direction:column;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;height:100%;background-color:#fff;border:1px solid #dcdcdd;border-radius:.25rem;color:#3b383e;line-height:1.5rem;overflow-wrap:break-word;word-wrap:break-word}.uq-card__link{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:-1000%;box-shadow:0 .25rem .25rem rgba(59,56,62,.05);transition:all ease .25s;z-index:10}.uq-card__link:hover,.uq-card__link:focus{box-shadow:0 .5rem 1rem rgba(59,56,62,.15)}.uq-card__image-wrapper{max-height:190px;overflow:hidden}@media(min-width: 37.5rem){.uq-card__image-wrapper{max-height:15rem}}.uq-card__image{position:relative;padding-bottom:70%;overflow:hidden}.uq-card__image img{position:absolute;top:50%;left:50%;width:100%;transform:translate(-50%, -50%);-o-object-fit:cover;object-fit:cover;z-index:0}.uq-card__content-wrapper{display:flex;flex-direction:column;flex-grow:1}.uq-card__content{flex-grow:1;padding:1.5rem}.uq-card__content :last-child .uq-card__title{margin-bottom:0}.uq-card__header :last-child{margin:0 0 .5rem}.uq-card__body p{margin-top:0}.uq-card__body p:last-child{margin-bottom:0}.uq-card__actions{padding:0 1.5rem 1.5rem}.uq-card__actions p:last-child{margin-bottom:0}.uq-card__title{font-size:1.25rem;color:#3b383e;margin:0 0 .5rem}@media(min-width: 37.5rem){.uq-card__title{font-size:1.5rem}}.uq-card__title-super{font-size:.875rem;font-weight:500;color:#962a8b;text-transform:uppercase;margin:0 0 .5rem}@media(min-width: 37.5rem){.uq-card__title-super{font-size:1rem}}.uq-card__title-super--grey{font-weight:400;color:#5e5b60}.uq-card--shaded{background-color:#f3f3f4}@media(max-width: 37.4375rem){.uq-grid__col:first-child:nth-last-child(3) .uq-card--story,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event{flex-direction:row;padding-bottom:1rem;border:none;border-bottom:1px solid #dcdcdd;box-shadow:0 .25rem .25rem rgba(59,56,62,0)}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(3) .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event:focus,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event:focus{box-shadow:0 .5rem .5rem rgba(59,56,62,.1)}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__image__wrapper{min-width:98px;min-height:100%}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__image,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__image{min-height:100%;padding-bottom:0%}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__content__wrapper{min-width:50%}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__content,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__content{padding:0 1rem}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__title,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__title{margin:0 0 .5rem}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__body,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__body{display:none}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__actions,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__actions{padding:0 1rem 0}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event{flex-direction:row;padding-bottom:1rem;border:none;border-bottom:1px solid #dcdcdd;box-shadow:0 .25rem .25rem rgba(59,56,62,0)}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(4) .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event:focus,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event:focus{box-shadow:0 .5rem .5rem rgba(59,56,62,.1)}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__image__wrapper{min-width:98px;min-height:100%}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__image,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__image{min-height:100%;padding-bottom:0%}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__content__wrapper{min-width:50%}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__content,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__content{padding:0 1rem}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__title,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__title{margin:0 0 .5rem}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__body,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__body{display:none}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__actions,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__actions{padding:0 1rem 0}}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card,.uq-grid__col--xl-12 .uq-card{flex-direction:row}}.uq-grid__col--md-8 .uq-card__image-wrapper,.uq-grid__col--xl-12 .uq-card__image-wrapper{min-width:100%;overflow:hidden}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__image-wrapper,.uq-grid__col--xl-12 .uq-card__image-wrapper{min-width:50%;max-height:100%}}.uq-grid__col--md-8 .uq-card__image,.uq-grid__col--xl-12 .uq-card__image{padding-bottom:70%}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__image,.uq-grid__col--xl-12 .uq-card__image{min-height:100%;padding-bottom:0%}}.uq-grid__col--md-8 .uq-card__content-wrapper,.uq-grid__col--xl-12 .uq-card__content-wrapper{min-width:100%}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__content-wrapper,.uq-grid__col--xl-12 .uq-card__content-wrapper{min-width:50%}}.uq-grid__col--md-8 .uq-card__content,.uq-grid__col--xl-12 .uq-card__content{padding:1.5rem}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__content,.uq-grid__col--xl-12 .uq-card__content{padding:3.5rem 3.5rem 1.5rem}}.uq-grid__col--md-8 .uq-card__body p,.uq-grid__col--xl-12 .uq-card__body p{white-space:normal;overflow:hidden;max-height:75px}.uq-grid__col--md-8 .uq-card__actions,.uq-grid__col--xl-12 .uq-card__actions{padding:0 1.5rem 1.5rem}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__actions,.uq-grid__col--xl-12 .uq-card__actions{padding:0 3.5rem 3.5rem}}.height-non-equalised .uq-card{height:auto}.text--link{color:#0d6dcd;text-decoration:none;transition:.2s color}.text--link:hover{color:#0d6dcd;text-decoration:underline}
|
|
1
|
+
:root{--card-title-font-size: 24px}@media(max-width: 37.4375rem){:root{--card-title-font-size: 22px}}.uq-card,.uq-story-card{position:relative;display:flex;flex-direction:column;border-radius:4px;border:1px solid #dcdcdd;background:#fff}.uq-card:has(a:focus-visible),.uq-story-card:has(a:focus-visible){outline:4px solid #0d6dcd;outline-offset:-1px}.uq-card:hover,.uq-story-card:hover{background:#f3f3f4}.uq-card:hover .uq-card__content::after,.uq-story-card:hover .uq-card__content::after{left:8px}.uq-card__content{flex:1;display:flex;flex-direction:column;padding:1.5rem}.uq-card__content::after{content:"";height:24px;width:24px;margin-top:auto;padding-top:1.5rem;position:relative;box-sizing:content-box;background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4 12h15M14 18l6-6-6-6' stroke='%2351247a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-position:right bottom;background-size:24px;background-repeat:no-repeat;transition:left 200ms ease-in-out;left:0}.uq-story-card__title,.uq-card__title{margin:0;color:#19151c;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;font-size:var(--card-title-font-size)}.uq-story-card__title a,.uq-card__title a{color:#19151c}.uq-story-card__title a::after,.uq-card__title a::after{content:"";position:absolute;inset:0}.uq-story-card__title a:focus,.uq-card__title a:focus{outline:none}.uq-story-card__title a:hover,.uq-card__title a:hover{background-color:rgba(0,0,0,0)}.uq-card__description,.uq-story-card__description{margin-top:.5rem}.uq-card__image,.uq-story-card__image{aspect-ratio:1.5/1;position:relative;flex-shrink:0}.uq-card__image img,.uq-story-card__image img,.uq-card__image picture,.uq-story-card__image picture{width:100%;height:100%;inset:0;position:absolute;object-fit:cover}.uq-card__icon{margin-bottom:.5rem}.uq-card__icon .uq-icon::before{height:56px;width:56px}.uq-card--text .uq-card__image,.uq-card--text .uq-story-card__image,.uq-card--text .uq-card__icon{display:none}.uq-card--image .uq-card__icon{display:none}.uq-card--icon .uq-card__image,.uq-card--icon .uq-story-card__image,.uq-card--icon-nav .uq-card__image,.uq-card--icon-nav .uq-story-card__image{display:none}@media(max-width: 37.4375rem){.uq-card--icon-nav .uq-card__content{display:flex;align-items:center;flex-direction:row}.uq-card--icon-nav .uq-card__content::after{padding-top:0;margin-top:0;margin-left:auto}.uq-card--icon-nav .uq-card__description,.uq-card--icon-nav .uq-story-card__description{display:none}.uq-card--icon-nav .uq-card__icon{margin:0 1rem 0 0}.uq-card--icon-nav .uq-card__icon .uq-icon::before{height:40px;width:40px}}@media(max-width: 37.4375rem){.uq-story-card{border-radius:0;border-inline-width:0;border-top-width:0;display:flex;flex-direction:row-reverse;align-items:center;gap:1rem;padding-bottom:1rem;background-color:rgba(0,0,0,0)}.uq-story-card:hover{background-color:rgba(0,0,0,0)}}.uq-story-card__content{flex:1;position:relative;display:flex;flex-direction:column;padding:1.5rem}@media(max-width: 37.4375rem){.uq-story-card__content{padding:0}}@media(max-width: 37.4375rem){.uq-story-card__title{-webkit-line-clamp:3}}@media(max-width: 37.4375rem){.uq-story-card__description{display:none}}.uq-story-card__top-label{margin-bottom:.25rem;color:#757377;font-weight:500}@media(max-width: 37.4375rem){.uq-story-card__top-label{margin-bottom:0}}.uq-story-card__bottom-label{padding-top:1.5rem;margin-top:auto}@media(max-width: 37.4375rem){.uq-story-card__bottom-label{margin-top:.5rem}}@media(max-width: 37.4375rem){.uq-story-card__image{width:120px;height:100px;aspect-ratio:unset;flex-shrink:0}}.uq-story-card--event .uq-story-card__top-label{color:#51247a}.uq-story-card--event .uq-story-card__description,.uq-story-card--story .uq-story-card__description{display:none}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uqds/card",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "Card components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"uqds",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"url": "https://github.com/uq-its-ss/design-system/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@uqds/core": "^1.2.0-alpha.
|
|
43
|
+
"@uqds/core": "^1.2.0-alpha.1",
|
|
44
|
+
"@uqds/icon": "^0.0.15-alpha.5"
|
|
44
45
|
},
|
|
45
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "3b41c2842c6e11853d433f37392e5dae72566555"
|
|
46
47
|
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "@uqds/icon/src/scss/global" as icon;
|
|
3
|
+
|
|
4
|
+
.uq-card {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
border: 1px solid #{core.$grey-200};
|
|
10
|
+
background: core.$white;
|
|
11
|
+
|
|
12
|
+
&:has(a:focus-visible) {
|
|
13
|
+
outline: 4px solid core.$utility-500;
|
|
14
|
+
outline-offset: -1px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
background: core.$grey-50;
|
|
19
|
+
|
|
20
|
+
& .uq-card__content::after {
|
|
21
|
+
left: 8px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.uq-card__content {
|
|
27
|
+
flex: 1;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
padding: core.$space-l;
|
|
31
|
+
|
|
32
|
+
&::after {
|
|
33
|
+
content: "";
|
|
34
|
+
height: 24px;
|
|
35
|
+
width: 24px;
|
|
36
|
+
margin-top: auto;
|
|
37
|
+
padding-top: core.$space-l;
|
|
38
|
+
position: relative;
|
|
39
|
+
box-sizing: content-box;
|
|
40
|
+
background-image: url(icon.get-icon(
|
|
41
|
+
"standard--arrow-right",
|
|
42
|
+
core.$purple-500
|
|
43
|
+
));
|
|
44
|
+
background-position: right bottom;
|
|
45
|
+
background-size: 24px;
|
|
46
|
+
background-repeat: no-repeat;
|
|
47
|
+
transition: left 200ms ease-in-out;
|
|
48
|
+
left: 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
%uq-card__title,
|
|
53
|
+
.uq-card__title {
|
|
54
|
+
margin: 0;
|
|
55
|
+
color: core.$black;
|
|
56
|
+
display: -webkit-box;
|
|
57
|
+
-webkit-box-orient: vertical;
|
|
58
|
+
-webkit-line-clamp: 4;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
font-size: var(--card-title-font-size);
|
|
61
|
+
|
|
62
|
+
& a {
|
|
63
|
+
color: core.$black;
|
|
64
|
+
|
|
65
|
+
&::after {
|
|
66
|
+
content: "";
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:focus {
|
|
72
|
+
outline: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.uq-card__description {
|
|
82
|
+
margin-top: core.$space-s;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.uq-card__image {
|
|
86
|
+
aspect-ratio: 1.5 / 1;
|
|
87
|
+
position: relative;
|
|
88
|
+
flex-shrink: 0;
|
|
89
|
+
|
|
90
|
+
& img,
|
|
91
|
+
& picture {
|
|
92
|
+
width: 100%;
|
|
93
|
+
height: 100%;
|
|
94
|
+
inset: 0;
|
|
95
|
+
position: absolute;
|
|
96
|
+
object-fit: cover;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.uq-card__icon {
|
|
101
|
+
margin-bottom: core.$space-s;
|
|
102
|
+
|
|
103
|
+
& .uq-icon::before {
|
|
104
|
+
height: 56px;
|
|
105
|
+
width: 56px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.uq-card--text {
|
|
110
|
+
& .uq-card__image,
|
|
111
|
+
& .uq-card__icon {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.uq-card--image {
|
|
117
|
+
& .uq-card__icon {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.uq-card--icon,
|
|
123
|
+
.uq-card--icon-nav {
|
|
124
|
+
& .uq-card__image {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.uq-card--icon-nav {
|
|
130
|
+
@media #{core.$screen-md-down} {
|
|
131
|
+
& .uq-card__content {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
flex-direction: row;
|
|
135
|
+
|
|
136
|
+
&::after {
|
|
137
|
+
padding-top: 0;
|
|
138
|
+
margin-top: 0;
|
|
139
|
+
margin-left: auto;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
& .uq-card__description {
|
|
144
|
+
display: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
& .uq-card__icon {
|
|
148
|
+
margin: 0 core.$space-m 0 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.uq-card__icon .uq-icon::before {
|
|
152
|
+
height: 40px;
|
|
153
|
+
width: 40px;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
package/src/scss/_component.scss
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
background-color: core.$white;
|
|
15
15
|
border: 1px solid core.$grey-200;
|
|
16
16
|
border-radius: core.$space-xs;
|
|
17
|
-
color: core.$
|
|
17
|
+
color: core.$grey-900;
|
|
18
18
|
line-height: core.$space-l;
|
|
19
19
|
overflow-wrap: break-word;
|
|
20
20
|
word-wrap: break-word;
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
&:hover,
|
|
35
35
|
&:focus {
|
|
36
|
+
background-color: transparent;
|
|
36
37
|
box-shadow: 0 core.$space-s core.$space-m rgba(core.$grey-900, 0.15);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -212,12 +213,13 @@
|
|
|
212
213
|
|
|
213
214
|
// This should be replaced with a component specfic class or removed and documented as a body package dependancy for usage with cards.
|
|
214
215
|
.text--link {
|
|
215
|
-
color: core.$
|
|
216
|
+
color: core.$purple-500;
|
|
216
217
|
text-decoration: none;
|
|
217
218
|
transition: 0.2s color;
|
|
218
219
|
|
|
219
220
|
&:hover {
|
|
220
|
-
color: core.$
|
|
221
|
+
background-color: core.$purple-500;
|
|
222
|
+
color: core.$white;
|
|
221
223
|
text-decoration: underline;
|
|
222
224
|
}
|
|
223
225
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "card";
|
|
3
|
+
|
|
4
|
+
.uq-story-card {
|
|
5
|
+
@extend .uq-card;
|
|
6
|
+
|
|
7
|
+
@media #{core.$screen-md-down} {
|
|
8
|
+
border-radius: 0;
|
|
9
|
+
border-inline-width: 0;
|
|
10
|
+
border-top-width: 0;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row-reverse;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: core.$space-m;
|
|
15
|
+
padding-bottom: core.$space-m;
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.uq-story-card__content {
|
|
25
|
+
flex: 1;
|
|
26
|
+
position: relative;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
padding: core.$space-l;
|
|
30
|
+
|
|
31
|
+
@media #{core.$screen-md-down} {
|
|
32
|
+
padding: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.uq-story-card__title {
|
|
37
|
+
@extend %uq-card__title;
|
|
38
|
+
|
|
39
|
+
@media #{core.$screen-md-down} {
|
|
40
|
+
-webkit-line-clamp: 3;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.uq-story-card__description {
|
|
45
|
+
@extend .uq-card__description;
|
|
46
|
+
|
|
47
|
+
@media #{core.$screen-md-down} {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.uq-story-card__top-label {
|
|
53
|
+
margin-bottom: core.$space-xs;
|
|
54
|
+
color: core.$grey-700;
|
|
55
|
+
font-weight: core.$font-weight-medium;
|
|
56
|
+
|
|
57
|
+
@media #{core.$screen-md-down} {
|
|
58
|
+
margin-bottom: 0;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.uq-story-card__bottom-label {
|
|
63
|
+
padding-top: core.$space-l;
|
|
64
|
+
margin-top: auto;
|
|
65
|
+
|
|
66
|
+
@media #{core.$screen-md-down} {
|
|
67
|
+
margin-top: core.$space-s;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.uq-story-card__image {
|
|
72
|
+
@extend .uq-card__image;
|
|
73
|
+
|
|
74
|
+
@media #{core.$screen-md-down} {
|
|
75
|
+
width: 120px;
|
|
76
|
+
height: 100px;
|
|
77
|
+
aspect-ratio: unset;
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.uq-story-card--event {
|
|
83
|
+
& .uq-story-card__top-label {
|
|
84
|
+
color: core.$purple-500;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.uq-story-card--event,
|
|
89
|
+
.uq-story-card--story {
|
|
90
|
+
.uq-story-card__description {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
}
|
package/src/scss/main.scss
CHANGED