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

Align borders #232

Merged
merged 1 commit into from
Jul 14, 2024
Merged
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
5 changes: 3 additions & 2 deletions src/css/_about.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "theme/borders";
@use "theme/breakpoints";
@use "theme/colors";
@use "theme/icons";
Expand Down Expand Up @@ -28,8 +29,8 @@
font-size: typography.$font-size-base;
padding: spacing.$container-edge-spacing;

border: 1px solid colors.$gray-translucent;
border-radius: 10px;
border: borders.$component-border;
border-radius: borders.$border-radius;

overflow-y: auto;

Expand Down
22 changes: 14 additions & 8 deletions src/css/_controls.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "theme/borders";
@use "theme/colors";
@use "theme/spacing";
@use "theme/typography";
Expand All @@ -7,17 +8,15 @@ $label-font-size: typography.$font-size-md;
$zoom-controls-top-offset: calc(
58px + spacing.$map-controls-margin-top - header.$header-height
);
$outer-border-thickness: 2px;
$option-divider: 1px solid colors.$gray-translucent;

.leaflet-left .leaflet-control {
margin-left: spacing.$map-controls-margin-x;
}

.leaflet-control-zoom.leaflet-bar,
.leaflet-control-zoom.leaflet-bar.leaflet-control,
.leaflet-control-layers.leaflet-control {
border: $outer-border-thickness solid colors.$gray-translucent;
border-radius: 4px;
border: borders.$component-border;
border-radius: borders.$border-radius;
}

.leaflet-control-zoom.leaflet-bar {
Expand All @@ -34,7 +33,14 @@ $option-divider: 1px solid colors.$gray-translucent;
justify-content: center;

&:first-child {
border-bottom: $option-divider;
border-bottom: borders.$component-inner-divider;
border-top-left-radius: borders.$border-radius;
border-top-right-radius: borders.$border-radius;
}

&:last-child {
border-bottom-left-radius: borders.$border-radius;
border-bottom-right-radius: borders.$border-radius;
}
}
}
Expand All @@ -46,7 +52,7 @@ $option-divider: 1px solid colors.$gray-translucent;

#map > div.leaflet-control-container > div.leaflet-top.leaflet-right {
$zoom-controls-height: calc(
(spacing.$min-touch-target * 2) + $outer-border-thickness
(spacing.$min-touch-target * 2) + borders.$border-thickness
);
top: calc(
$zoom-controls-top-offset + $zoom-controls-height + spacing.$element-gap
Expand All @@ -68,7 +74,7 @@ $option-divider: 1px solid colors.$gray-translucent;
line-height: 1;

&:first-child {
border-bottom: $option-divider;
border-bottom: borders.$component-inner-divider;
}

display: flex;
Expand Down
14 changes: 13 additions & 1 deletion src/css/_header.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "theme/borders";
@use "theme/breakpoints";
@use "theme/colors";
@use "theme/spacing";
Expand Down Expand Up @@ -64,7 +65,6 @@ $header-height: calc(

.choices[data-type*="select-one"] {
.choices__inner {
border-radius: 10px;
color: colors.$black;
font-size: typography.$font-size-base;
line-height: 1.2; // To vertically center the text.
Expand All @@ -75,6 +75,18 @@ $header-height: calc(
@include breakpoints.gt-xs {
min-width: 300px;
}

border-top-left-radius: borders.$border-radius;
border-top-right-radius: borders.$border-radius;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}

&:not(.is-open) {
.choices__inner {
border-bottom-left-radius: borders.$border-radius;
border-bottom-right-radius: borders.$border-radius;
}
}

.choices__input {
Expand Down
15 changes: 8 additions & 7 deletions src/css/_scorecard.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
@use "theme/borders";
@use "theme/breakpoints";
@use "theme/colors";
@use "theme/spacing";
@use "theme/icons";
@use "theme/typography";
@use "header";

$border-radius: 10px;

.popup-fixed {
position: fixed;
transform: none !important;
Expand Down Expand Up @@ -35,7 +34,9 @@ $border-radius: 10px;
right: spacing.$map-controls-margin-x;
top: calc(header.$header-height + spacing.$map-controls-margin-top);

border-radius: $border-radius;
border: borders.$component-border;
border-radius: borders.$border-radius;
box-shadow: none;
color: colors.$black;

p,
Expand Down Expand Up @@ -85,10 +86,10 @@ $border-radius: 10px;
background-color: colors.$white;
border-left: 0;
border-right: 0;
border-top: 1px solid colors.$gray-translucent;
border-top: borders.$component-inner-divider;
border-bottom: 0;
border-bottom-left-radius: $border-radius;
border-bottom-right-radius: $border-radius;
border-bottom-left-radius: borders.$border-radius;
border-bottom-right-radius: borders.$border-radius;

.scorecard-accordion-title {
flex: 1;
Expand All @@ -108,7 +109,7 @@ $border-radius: 10px;
}

.scorecard-accordion-content {
border-top: 1px solid colors.$gray-translucent;
border-top: borders.$component-inner-divider;
padding-top: spacing.$element-gap;

ul {
Expand Down
7 changes: 7 additions & 0 deletions src/css/theme/_borders.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@use "colors";

$border-radius: 5px;

$border-thickness: 1px;
$component-border: $border-thickness solid colors.$black-translucent;
$component-inner-divider: $border-thickness solid colors.$black-translucent;
2 changes: 1 addition & 1 deletion src/css/theme/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ $teal: hsl(173, 72%, 46%);
$white: hsl(0, 0%, 100%);
$black: hsl(0, 0%, 0%);
$gray: hsl(0, 0%, 25.88%); // Color comes from the logo
$gray-translucent: hsla(0, 0%, 70%, 0.7);
$black-translucent: hsla(0, 0%, 0%, 0.4);
Loading