bulma/sass/components/media.scss

82 lines
1.8 KiB
SCSS
Raw Normal View History

2022-11-23 17:44:02 +00:00
@import "../utilities/mixins";
$media-border-color: bulmaRgba($border, 0.5) !default;
$media-border-size: 1px !default;
$media-spacing: 1rem !default;
$media-spacing-large: 1.5rem !default;
$media-content-spacing: 0.75rem !default;
$media-level-1-spacing: 0.75rem !default;
$media-level-1-content-spacing: 0.5rem !default;
$media-level-2-spacing: 0.5rem !default;
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media {
2022-11-23 17:44:02 +00:00
align-items: flex-start;
display: flex;
text-align: inherit;
2022-11-23 22:53:56 +00:00
.#{$class-prefix}content:not(:last-child) {
2022-11-23 17:44:02 +00:00
margin-bottom: $media-content-spacing;
}
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media {
2022-11-23 17:44:02 +00:00
border-top: $media-border-size solid $media-border-color;
display: flex;
padding-top: $media-level-1-spacing;
2022-11-23 22:53:56 +00:00
.#{$class-prefix}content:not(:last-child),
.#{$class-prefix}control:not(:last-child) {
2022-11-23 17:44:02 +00:00
margin-bottom: $media-level-1-content-spacing;
}
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media {
2022-11-23 17:44:02 +00:00
padding-top: $media-level-2-spacing;
2022-11-23 22:53:56 +00:00
& + .#{$class-prefix}media {
2022-11-23 17:44:02 +00:00
margin-top: $media-level-2-spacing;
}
}
}
2022-11-23 22:53:56 +00:00
& + .#{$class-prefix}media {
2022-11-23 17:44:02 +00:00
border-top: $media-border-size solid $media-border-color;
margin-top: $media-spacing;
padding-top: $media-spacing;
}
// Sizes
&.is-large {
2022-11-23 22:53:56 +00:00
& + .#{$class-prefix}media {
2022-11-23 17:44:02 +00:00
margin-top: $media-spacing-large;
padding-top: $media-spacing-large;
}
}
}
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media-left,
.#{$class-prefix}media-right {
2022-11-23 17:44:02 +00:00
flex-basis: auto;
flex-grow: 0;
flex-shrink: 0;
}
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media-left {
2022-11-23 17:44:02 +00:00
@include ltr-property("margin", $media-spacing);
}
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media-right {
2022-11-23 17:44:02 +00:00
@include ltr-property("margin", $media-spacing, false);
}
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media-content {
2022-11-23 17:44:02 +00:00
flex-basis: auto;
flex-grow: 1;
flex-shrink: 1;
text-align: inherit;
}
@include mobile {
2022-11-23 22:53:56 +00:00
.#{$class-prefix}media-content {
2022-11-23 17:44:02 +00:00
overflow-x: auto;
}
}