philomena/assets/css/elements/block.css

184 lines
3.6 KiB
CSS
Raw Normal View History

@define-mixin block-type $type {
2024-04-30 20:38:28 +02:00
.block--$(type) .block__content {
border-color: var(--$(type)-border-color);
background: var(--$(type)-dark-color);
}
.block--$(type) .block__footer {
background: var(--$(type)-color);
}
.block--$(type).block--muted {
border-color: var(--$(type)-color);
}
.block--$(type).block--fixed {
background: var(--$(type)-color);
}
.block--$(type) a {
color: var(--$(type)-link-color);
}
.block--$(type) a:hover {
color: var(--link-hover-color);
2023-11-23 17:07:49 +01:00
}
2024-05-01 00:10:05 +02:00
.block--$(type) hr {
border-color: var(--$(type)-border-color);
}
2023-11-23 17:07:49 +01:00
}
.block {
margin-bottom: var(--padding-large);
2023-11-23 17:07:49 +01:00
overflow: hidden;
}
@mixin even-odd block--alternating;
2023-11-23 17:07:49 +01:00
.block .block {
border-radius: var(--border-radius-inner);
}
.block--muted {
border-color: var(--primary-color);
}
.block--borderless {
border: 0 !important;
border-radius: 0 !important;
}
.block--borderless:first-of-type {
border-top-left-radius: var(--border-radius-outer) !important;
border-top-right-radius: var(--border-radius-outer) !important;
}
.block--borderless:last-of-type {
border-bottom-left-radius: var(--border-radius-outer) !important;
border-bottom-right-radius: var(--border-radius-outer) !important;
2023-11-23 17:07:49 +01:00
}
2024-06-12 20:50:46 +02:00
.block__content {
2023-11-23 17:07:49 +01:00
border-radius: var(--border-radius-outer);
padding: var(--padding-normal);
background: var(--primary-dark-color);
}
.block__content--small {
padding: var(--padding-small);
}
2024-05-20 22:30:41 +02:00
.block__footer,
.block__footer--small {
display: flex;
flex-direction: row;
2023-11-23 17:07:49 +01:00
background: var(--primary-muted-color);
padding: var(--padding-normal);
margin-top: var(--padding-normal);
border-radius: var(--border-radius-outer);
2023-11-23 17:07:49 +01:00
}
.block__footer--small {
margin: var(--padding-small);
margin-top: 0;
}
@mixin if-phone {
2023-11-23 17:07:49 +01:00
.block__content {
padding: var(--padding-small);
}
.block__footer {
margin: var(--padding-small);
margin-top: 0;
}
}
2024-05-20 22:30:41 +02:00
.block__header,
.block__header--single-item {
2023-11-23 17:07:49 +01:00
line-height: var(--block-header-height);
padding: 0 var(--padding-normal);
font-size: var(--font-header-size);
2024-04-28 18:51:40 +02:00
margin-bottom: var(--padding-small);
2024-04-30 20:38:28 +02:00
}
2023-11-23 17:07:49 +01:00
2024-05-20 22:30:41 +02:00
.block__header > .fa,
.block__header--single-item > .fa {
2024-04-30 20:38:28 +02:00
margin-right: var(--padding-normal);
2023-11-23 17:07:49 +01:00
}
.block__header--single-item {
display: inline-block;
width: 100%;
box-sizing: border-box;
font-weight: bold;
color: var(--link-color) !important;
}
2024-04-28 18:51:40 +02:00
.block__header__buttons {
display: flex;
gap: var(--padding-normal);
line-height: var(--block-header-height);
font-size: var(--font-size);
padding: 0 var(--padding-normal);
}
2024-05-20 21:25:43 +02:00
.block--borderless .block__header {
padding: 0;
}
2023-11-23 17:07:49 +01:00
.block--fixed {
padding: var(--padding-normal);
2023-11-23 22:20:02 +01:00
border-radius: var(--border-radius-inner);
2024-04-17 16:52:50 +02:00
background: var(--primary-muted-color);
margin-bottom: var(--padding-normal);
2024-04-17 16:52:50 +02:00
}
2024-05-20 22:30:41 +02:00
.block__content > *:last-child,
.block--fixed > *:last-child {
2024-04-17 16:52:50 +02:00
margin-bottom: 0;
}
2024-05-20 22:30:41 +02:00
.block__content > *:first-child,
.block--fixed > *:first-child {
2024-04-17 16:52:50 +02:00
margin-top: 0;
2023-11-23 17:07:49 +01:00
}
.block__header--js-tabbed {
display: flex;
padding: 0;
2024-06-12 20:50:46 +02:00
gap: var(--padding-small);
2024-05-01 00:10:05 +02:00
}
@mixin if-mobile {
.block__header--js-tabbed {
gap: 0;
justify-content: space-between;
}
2024-04-30 20:38:28 +02:00
}
2023-11-23 17:07:49 +01:00
2024-04-30 20:38:28 +02:00
.block__header--js-tabbed a {
display: block;
padding: 0 var(--padding-normal);
}
2023-11-23 17:07:49 +01:00
2024-04-30 20:38:28 +02:00
.block__header--js-tabbed a:hover {
2024-06-12 20:50:46 +02:00
background: var(--primary-dark-color);
2024-04-30 20:38:28 +02:00
}
2023-11-23 17:07:49 +01:00
2024-04-30 20:38:28 +02:00
.block__header--js-tabbed .selected {
2024-06-12 20:50:46 +02:00
background: var(--primary-dark-color);
2023-11-23 17:07:49 +01:00
}
.block--spaced-top {
margin-top: var(--padding-normal);
}
@mixin block-type secondary;
@mixin block-type success;
@mixin block-type warning;
@mixin block-type danger;
@mixin block-type information;
@mixin block-type special;