-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): tag form three column layout (#3665)
Set up the three column layout in the tag form. Includes placeholder states that will be replaced with proper content. Fixes: canonical/app-tribe#684.
- Loading branch information
Showing
8 changed files
with
138 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
ui/src/app/machines/components/MachineHeaderForms/ActionFormWrapper/TagForm/_index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@mixin move-border-top { | ||
@include pseudo-border(top); | ||
padding-top: $spv-inner--small; | ||
margin-top: $spv-inner--large; | ||
|
||
&::after { | ||
// Remove the left border. | ||
display: none; | ||
} | ||
} | ||
|
||
@mixin TagForm { | ||
.tag-form { | ||
@extend %base-grid; | ||
border-bottom: 1px solid $color-mid-light; | ||
padding-bottom: $spv-inner--large; | ||
grid: | ||
[row1-start] "search changes details" min-content [row1-end] | ||
/ minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); | ||
|
||
.tag-form__search { | ||
grid-area: search; | ||
|
||
&::after { | ||
top: $spv-inner--small; | ||
} | ||
} | ||
|
||
.tag-form__changes { | ||
@include pseudo-border(left); | ||
grid-area: changes; | ||
|
||
&::after { | ||
top: $spv-inner--small; | ||
} | ||
} | ||
|
||
.tag-form__details { | ||
@include pseudo-border(left); | ||
grid-area: details; | ||
|
||
&::after { | ||
top: $spv-inner--small; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: $breakpoint-large) { | ||
grid: | ||
[row1-start] "search changes" min-content [row1-end] | ||
[row2-start] "details details" min-content [row2-end] | ||
/ minmax(0, 1fr) minmax(0, 1fr); | ||
|
||
.tag-form__details { | ||
@include move-border-top; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: $breakpoint-medium) { | ||
grid: | ||
[row1-start] "search" min-content [row1-end] | ||
[row2-start] "changes" min-content [row2-end] | ||
[row3-start] "details" min-content [row3-end] | ||
/ minmax(0, 1fr); | ||
|
||
.tag-form__changes { | ||
@include move-border-top; | ||
} | ||
} | ||
} | ||
} |
27 changes: 0 additions & 27 deletions
27
ui/src/app/machines/views/MachineDetails/MachineSummary/OverviewCard/_index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@mixin pseudo-border($pos) { | ||
position: relative; | ||
|
||
&::after, | ||
&::before { | ||
background-color: $color-mid-light; | ||
content: ""; | ||
position: absolute; | ||
} | ||
|
||
@if $pos == top { | ||
&::before { | ||
height: 1px; | ||
left: 0; | ||
right: 0; | ||
top: 0; | ||
} | ||
} @else if $pos == left { | ||
&::after { | ||
bottom: 0; | ||
left: -#{math.div(map-get($grid-gutter-widths, large), 2)}; | ||
top: 0; | ||
width: 1px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters