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

fix(ffe-form): stabler telefon-inputs over hverandre på små skjermer #1934

Merged
merged 1 commit into from
Apr 24, 2024
Merged
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
19 changes: 17 additions & 2 deletions packages/ffe-form/less/phone-number.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.ffe-phone-number {
&__input-group {
@media (min-width: @breakpoint-sm) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

burde vi bruke container queries istellet for media queries når vi liks er i gang. Det har veldig fint browserstøtte. Hvis man har 3 kolumner på desktop feks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Det kan godt være fornuftigere ja. Men kanskje vi kan gjøre den forbedringen i en ny PR, så vi kan se på om breakpointene fortsatt gir mening i den konteksten

display: flex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Når vi har flex burde vi ha flex-wrap for og klare zoom?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usikker på hva du mener? Flex-wrap er default/nowrap fordi inputene skal ligge ved siden av hverandre. De tåler zoom godt på større skjermer så vidt jeg har kunnet teste meg frem til.

}
}

&__country-code &__input-group {
display: flex;
}

Expand All @@ -11,13 +17,20 @@
white-space: nowrap;
margin-right: @ffe-spacing-xs;
}

@media (max-width: (@breakpoint-sm - 1)) {
margin-bottom: var(--ffe-spacing-sm);
}
}

&__country-code-input {
max-width: 60px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-right: @ffe-spacing-sm;

@media (min-width: @breakpoint-sm) {
max-width: 4rem;
margin-right: var(--ffe-spacing-sm);
}
}

&__plus {
Expand All @@ -30,6 +43,8 @@
border-right: 0;
transition: all @ffe-transition-duration @ffe-ease;
color: var(--ffe-v-input-color);
display: flex;
align-items: center;
}

&__number {
Expand Down
Loading