Skip to content

Commit

Permalink
fix: added max-width attribute to row to fit elements within page whe…
Browse files Browse the repository at this point in the history
…n zoomed in (#773)
  • Loading branch information
sabrina-bongiovanni authored Sep 17, 2024
1 parent 7915b92 commit c94001f
Showing 1 changed file with 38 additions and 32 deletions.
70 changes: 38 additions & 32 deletions src/theme/ItaliaTheme/Blocks/_form.scss
Original file line number Diff line number Diff line change
@@ -1,45 +1,50 @@
.public-ui {
.block.form {
@media (max-width: #{map-get($grid-breakpoints, md)}) {
.form-group {
display: flex;
flex-direction: column;

label {
position: relative;
order: 1;
font-size: 0.777rem;
line-height: 1.375rem;
transform: none;
transform: none;
white-space: normal;

&.active {
.row {
max-width: 100%;

@media (max-width: #{map-get($grid-breakpoints, md)}) {
.form-group {
display: flex;
flex-direction: column;
max-width: 100%;

label {
position: relative;
order: 1;
font-size: 0.777rem;
line-height: 1.375rem;
transform: none;
transform: none;
white-space: normal;

&.active {
font-size: 0.777rem;
transform: none;
}
}
}

input,
textarea,
.form-input-file {
order: 2;
}
input,
textarea,
.form-input-file {
order: 2;
}

input[type='date'] ~ label {
font-size: 0.777rem;
transform: none;
}
input[type='date'] ~ label {
font-size: 0.777rem;
transform: none;
}

small.form-text {
position: relative;
order: 3;
small.form-text {
position: relative;
order: 3;
}
}
}

.form-input-file {
.dropzone-placeholder {
margin-top: 0;
.form-input-file {
.dropzone-placeholder {
margin-top: 0;
}
}
}
}
Expand All @@ -65,6 +70,7 @@
&,
.volto-subblocks-wrapper,
.form-field {
max-width: 100%;
.single-block {
.dragsubblock {
top: 0.3rem;
Expand Down

0 comments on commit c94001f

Please sign in to comment.