Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Rename Breakout to Breakout Spotlight #1629

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- @license CC0-1.0 -->

# Breakout
# Breakout Spotlight

A composition that lets a figure – e.g. an image, video or map – break out of a Spotlight.
Original file line number Diff line number Diff line change
Expand Up @@ -7,156 +7,156 @@
@import "../grid/grid";
@import "../grid/mixins";

$ams-breakout-row-span-max: 4;
$ams-breakout-spotlight-row-span-max: 4;

.ams-breakout {
.ams-breakout-spotlight {
@include ams-grid;
}

// Grid gap

.ams-breakout--gap-vertical--none {
.ams-breakout-spotlight--gap-vertical--none {
@include ams-grid--gap-vertical--none;
}

.ams-breakout--gap-vertical--small {
.ams-breakout-spotlight--gap-vertical--small {
@include ams-grid--gap-vertical--small;
}

.ams-breakout--gap-vertical--large {
.ams-breakout-spotlight--gap-vertical--large {
@include ams-grid--gap-vertical--large;
}

// Grid padding

.ams-breakout--padding-bottom--small {
.ams-breakout-spotlight--padding-bottom--small {
@include ams-grid--padding-bottom--small;
}

.ams-breakout--padding-bottom--medium {
.ams-breakout-spotlight--padding-bottom--medium {
@include ams-grid--padding-bottom--medium;
}

.ams-breakout--padding-bottom--large {
.ams-breakout-spotlight--padding-bottom--large {
@include ams-grid--padding-bottom--large;
}

.ams-breakout--padding-top--small {
.ams-breakout-spotlight--padding-top--small {
@include ams-grid--padding-top--small;
}

.ams-breakout--padding-top--medium {
.ams-breakout-spotlight--padding-top--medium {
@include ams-grid--padding-top--medium;
}

.ams-breakout--padding-top--large {
.ams-breakout-spotlight--padding-top--large {
@include ams-grid--padding-top--large;
}

.ams-breakout--padding-vertical--small {
.ams-breakout-spotlight--padding-vertical--small {
@include ams-grid--padding-vertical--small;
}

.ams-breakout--padding-vertical--medium {
.ams-breakout-spotlight--padding-vertical--medium {
@include ams-grid--padding-vertical--medium;
}

.ams-breakout--padding-vertical--large {
.ams-breakout-spotlight--padding-vertical--large {
@include ams-grid--padding-vertical--large;
}

// Column span
// The order of these declaration blocks ensures the intended specificity.

.ams-breakout__cell--col-span-all {
.ams-breakout-spotlight__cell--col-span-all {
@include ams-grid__cell--span-all;
}

@for $i from 1 through $ams-grid-column-count {
.ams-breakout__cell--col-span-#{$i} {
.ams-breakout-spotlight__cell--col-span-#{$i} {
@include ams-grid__cell--span($i);
}

.ams-breakout__cell--col-start-#{$i} {
.ams-breakout-spotlight__cell--col-start-#{$i} {
@include ams-grid__cell--start($i);
}
}

@media screen and (min-width: $ams-breakpoint-medium) {
@for $i from 1 through $ams-grid-column-count {
.ams-breakout__cell--col-span-#{$i}-medium {
.ams-breakout-spotlight__cell--col-span-#{$i}-medium {
@include ams-grid__cell--span-medium($i);
}

.ams-breakout__cell--col-start-#{$i}-medium {
.ams-breakout-spotlight__cell--col-start-#{$i}-medium {
@include ams-grid__cell--start-medium($i);
}
}
}

@media screen and (min-width: $ams-breakpoint-wide) {
@for $i from 1 through $ams-grid-column-count {
.ams-breakout__cell--col-span-#{$i}-wide {
.ams-breakout-spotlight__cell--col-span-#{$i}-wide {
@include ams-grid__cell--span-wide($i);
}

.ams-breakout__cell--col-start-#{$i}-wide {
.ams-breakout-spotlight__cell--col-start-#{$i}-wide {
@include ams-grid__cell--start-wide($i);
}
}
}

// Has content

.ams-breakout__cell--has-figure {
.ams-breakout-spotlight__cell--has-figure {
align-self: end;
}

.ams-breakout__cell--has-spotlight {
.ams-breakout-spotlight__cell--has-spotlight {
display: grid; /* Stretches the empty Spotlight vertically. */
margin-block: calc(var(--ams-space-grid-md) * -1);
margin-inline: calc(var(--ams-space-grid-lg) * -1);

.ams-breakout--gap-vertical--small > & {
.ams-breakout-spotlight--gap-vertical--small > & {
margin-block: calc(var(--ams-space-grid-sm) * -1);
}

.ams-breakout--gap-vertical--large > & {
.ams-breakout-spotlight--gap-vertical--large > & {
margin-block: calc(var(--ams-space-grid-lg) * -1);
}
}

// Row span

@for $i from 1 through $ams-breakout-row-span-max {
.ams-breakout__cell--row-span-#{$i} {
@for $i from 1 through $ams-breakout-spotlight-row-span-max {
.ams-breakout-spotlight__cell--row-span-#{$i} {
grid-row-end: span $i;
}

.ams-breakout__cell--row-start-#{$i} {
.ams-breakout-spotlight__cell--row-start-#{$i} {
grid-row-start: $i;
}
}

@media screen and (min-width: $ams-breakpoint-medium) {
@for $i from 1 through $ams-breakout-row-span-max {
.ams-breakout__cell--row-span-#{$i}-medium {
@for $i from 1 through $ams-breakout-spotlight-row-span-max {
.ams-breakout-spotlight__cell--row-span-#{$i}-medium {
grid-row-end: span $i;
}

.ams-breakout__cell--row-start-#{$i}-medium {
.ams-breakout-spotlight__cell--row-start-#{$i}-medium {
grid-row-start: $i;
}
}
}

@media screen and (min-width: $ams-breakpoint-wide) {
@for $i from 1 through $ams-breakout-row-span-max {
.ams-breakout__cell--row-span-#{$i}-wide {
@for $i from 1 through $ams-breakout-spotlight-row-span-max {
.ams-breakout-spotlight__cell--row-span-#{$i}-wide {
grid-row-end: span $i;
}

.ams-breakout__cell--row-start-#{$i}-wide {
.ams-breakout-spotlight__cell--row-start-#{$i}-wide {
grid-row-start: $i;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/* Append here */
@import "./action-group/action-group";
@import "./breakout/breakout";
@import "./breakout-spotlight/breakout-spotlight";
@import "./hint/hint";
@import "./password-input/password-input";
@import "./form-error-list/form-error-list";
Expand Down
40 changes: 0 additions & 40 deletions packages/react/src/Breakout/Breakout.tsx

This file was deleted.

Loading