Skip to content

Commit 973ede6

Browse files
aparzikirjs
authored andcommitted
refactor: Mobile layout api reference
Fix mobile layout shift in API reference fix angular#67650
1 parent 59513b7 commit 973ede6

1 file changed

Lines changed: 58 additions & 27 deletions

File tree

adev/src/app/features/references/api-reference-list/api-reference-list.component.scss

Lines changed: 58 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
-webkit-tap-highlight-color: transparent;
2929

3030
.adev-reference-list-type-filter-label {
31-
margin-block: 2.5rem 1rem;
31+
margin-block: 1rem;
3232
}
3333

3434
.adev-reference-list-type-filter {
35+
box-sizing: border-box;
3536
display: grid;
3637
grid-template-columns: repeat(6, 1fr);
3738
margin-block: 0;
@@ -45,6 +46,7 @@
4546
}
4647
@container api-ref-page (max-width: 600px) {
4748
grid-template-columns: repeat(4, 1fr);
49+
max-width: 500px;
4850
}
4951
@container api-ref-page (max-width: 500px) {
5052
grid-template-columns: repeat(3, 1fr);
@@ -88,16 +90,70 @@
8890

8991
.adev-reference-list-query-filter {
9092
display: flex;
91-
gap: 1.5rem;
93+
gap: 1rem;
9294
flex-wrap: wrap;
95+
align-items: center;
9396
justify-content: space-between;
97+
98+
* {
99+
box-sizing: border-box;
100+
}
101+
102+
docs-text-field,
103+
docs-select {
104+
width: 100%;
105+
max-width: 350px;
106+
}
107+
108+
@container api-ref-page (max-width: 600px) {
109+
flex-direction: column;
110+
align-items: stretch;
111+
112+
docs-text-field,
113+
docs-select {
114+
width: 100%;
115+
max-width: 500px;
116+
}
117+
}
118+
}
119+
120+
.adev-reference-list-status {
121+
display: flex;
94122
align-items: center;
123+
margin-top: 1rem;
124+
125+
::ng-deep .mat-mdc-chip-listbox {
126+
@container api-ref-page (max-width: 600px) {
127+
width: 100%;
128+
max-width: 500px;
129+
130+
.mdc-evolution-chip-set__chips {
131+
display: grid !important;
132+
grid-template-columns: repeat(2, 1fr);
133+
gap: 8px;
134+
margin-left: 0;
135+
}
136+
137+
.mat-mdc-chip-option {
138+
min-width: 0;
139+
width: 100%;
140+
margin: 0;
141+
}
142+
}
143+
144+
@container api-ref-page (max-width: 350px) {
145+
.mdc-evolution-chip-set__chips {
146+
grid-template-columns: 1fr;
147+
}
148+
}
149+
}
95150
}
96151
}
97152

98153
.adev-reference-list-empty {
99154
text-align: center;
100155
margin-block-start: 2rem;
156+
flex-basis: 100%;
101157

102158
p {
103159
font-size: 1rem;
@@ -108,28 +164,3 @@
108164
width: 100%;
109165
}
110166
}
111-
112-
.adev-reference-list-empty {
113-
flex-basis: 100%;
114-
p {
115-
font-size: 1rem;
116-
}
117-
}
118-
119-
.docs-api-item-label-full {
120-
white-space: nowrap;
121-
}
122-
123-
.map-chip-option {
124-
min-width: 190px;
125-
}
126-
127-
.adev-reference-list-status {
128-
display: flex;
129-
align-items: center;
130-
margin-top: 12px;
131-
132-
label {
133-
margin-right: 8px;
134-
}
135-
}

0 commit comments

Comments
 (0)