Files
cunningham/apps/demo/src/index.scss
jbpenrath b1850c029a 🚨(react) fix type and sass warning after deps upgrade
- Do not use deprecated `map-get` Sass method
- Fix type issue in `DatePicker`
2025-05-05 17:56:15 +02:00

209 lines
3.6 KiB
SCSS

@use "sass:map";
@use "@openfun/cunningham-react/sass/fonts";
@use "@openfun/cunningham-react/sass/icons";
@use "@openfun/cunningham-react/style";
@use "cunningham-tokens";
@use "cunningham-tokens-sass" as *;
$lg: map.get($themes, "default", "theme", "breakpoints", "lg");
$sm: map.get($themes, "default", "theme", "breakpoints", "sm");
// Reset
h1 {
font-family: var(--c--theme--font--families--accent);
font-size: clamp(2.5rem, 7vw, 4rem);
margin: 0;
}
p {
margin: 0;
}
a {
color: var(--c--theme--colors--greyscale-800);
text-decoration: underline;
}
// App
html, body, #root {
width: 100%;
height: 100%;
margin: 0;
}
html {
background: linear-gradient(153deg, var(--c--theme--colors--greyscale-100) 0%, var(--c--theme--colors--greyscale-000) 100%);
background-attachment: fixed;
}
.pattern {
position: absolute;
z-index: -1;
top: -200px;
left: -290px;
transform: rotate(335deg);
}
.theme-switch {
position: fixed;
right: 1rem;
top: 0.75rem;
display: flex;
align-items: center;
gap: 1rem;
--c--components--forms-field--width: 150px;
}
.card {
background-color: var(--c--theme--colors--greyscale-000);
padding: 2rem;
border-radius: var(--c--components--card--border-radius, 4px);
border: var(--c--components--card--border-width, 1px) var(--c--theme--colors--greyscale-300) solid;
box-shadow: var(--c--components--card--box-shadow, rgba(149, 157, 165, 0.2) 0px 8px 24px);
}
.container {
margin: auto;
position: relative;
overflow: hidden;
width: 1100px;
min-height: 100%;
display: flex;
flex-direction: column;
@media (max-width: 1200px) {
width: calc(100% - 2rem);
}
}
// Home
.page__home {
display: flex;
flex-grow: 1;
flex-direction: column;
&__title {
gap: 1.5rem;
margin: 4rem 0;
@media (max-width: $lg) {
margin: 6rem 0 4rem 0;
}
button {
margin-top: 1.5rem;
}
}
section {
flex: 1;
}
}
html[data-theme="cunningham"] body {
background-repeat: no-repeat;
background-position: -300px -300px;
background-attachment: fixed;
}
html[data-theme="cunningham"][data-variant="dark"] body {
background-image: url(/pattern_dark.png);
}
html[data-theme="cunningham"][data-variant="light"] body {
background-image: url(/pattern_default.png);
}
html[data-theme="redflux"] {
background: #000000D7 url(/redflux_bg.webp) 50%/cover no-repeat fixed;
background-blend-mode: darken;
}
html[data-theme="blueney"] {
background: url(/blueney_bg.jpg) 50%/cover no-repeat fixed;
}
// Create
.page__create {
h1 {
text-align: center;
margin: 4rem 0;
}
&__group {
display: flex;
flex-direction: column;
gap: 1.5rem;
text-align: left;
h3, h4 {
margin: 0;
}
}
}
// Onboarding Modal
.onboarding__title {
margin-top: 0;
}
.onboarding__title-icon {
font-size: 2rem;
margin: 0;
}
.onboarding__content {
max-width: 680px;
line-height: 1.5rem;
text-align: left;
& p {
margin-bottom: 1rem;
}
}
.onboarding__footer {
display: flex;
justify-content: space-between;
flex-direction: row-reverse;
align-items: center;
gap: 1rem;
& > .c__button:first-child {
min-width: 200px;
justify-content: center;
}
@media (max-width: $sm) {
flex-direction: column;
flex-grow: 1;
> .c__button {
width: 100%;
min-width: auto;
}
}
}
.links {
border-top: thin solid var(--c--theme--colors--greyscale-300);
display: flex;
justify-content: space-between;
gap: 0.5rem;
margin-top: 5rem;
ul {
text-align: right;
padding: 0;
}
ul li {
display: inline-block;
padding: 0 0.5rem;
white-space: nowrap;
}
}