Skip to content

Commit 681e1ec

Browse files
vladboisadevversion
authored andcommitted
fix(docs-infra): fix calculation of height editor (angular#54128)
Apply the min() function for set the smallest height fix(docs-infra): move height into editor-wrapper Move the calculation rule of height edit into editor-wrapper selector fix(docs-infra): change has selector Change the has selector fix(docs-infra): change selector's for child Changing the selector for test this solution Fix PR Close angular#54128
1 parent c8af062 commit 681e1ec

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

adev/src/app/editor/code-editor/code-editor.component.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@
127127
&-hidden {
128128
display: none;
129129
}
130+
131+
// If error box are displayed, move inline-errors-box
132+
// to bottom of the editor and adjust height
133+
// so that scroll bar & content do not render under tabs
134+
&:has(~ .adev-inline-errors-box) ~ .adev-inline-errors-box {
135+
bottom: auto;
136+
}
137+
&:has(~ .adev-inline-errors-box) {
138+
height: min(75% - 49px);
139+
}
130140
}
131141

132142
.adev-inline-errors-box {

adev/src/app/editor/embedded-editor.component.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ $width-breakpoint: 950px;
3232
}
3333
}
3434

35-
// If error box are displayed, modify the height of the editor
36-
&:has(.adev-inline-errors-box) {
37-
.adev-code-editor-wrapper {
38-
height: calc(50% - 33px) ;
39-
}
40-
}
4135
// If files are displayed, share the space
4236
&:has(.docs-editor-tabs) {
4337
.adev-tutorial-code-editor {

0 commit comments

Comments
 (0)