Skip to content

Commit e34d8fb

Browse files
authored
fix(styling): make Operations more responsive on smaller screens (#9325)
Along with the operations, Topbar and Authorization button has been made more responsive as well. Refs #8940
1 parent 9bdbaef commit e34d8fb

File tree

3 files changed

+75
-13
lines changed

3 files changed

+75
-13
lines changed

src/core/components/operation-summary.jsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,15 @@ export default class OperationSummary extends PureComponent {
7373
onClick={toggleShown}
7474
>
7575
<OperationSummaryMethod method={method} />
76-
<OperationSummaryPath getComponent={getComponent} operationProps={operationProps} specPath={specPath} />
76+
<div className="opblock-summary-path-description-wrapper">
77+
<OperationSummaryPath getComponent={getComponent} operationProps={operationProps} specPath={specPath} />
7778

78-
{!showSummary ? null :
79-
<div className="opblock-summary-description">
80-
{toString(resolvedSummary || summary)}
81-
</div>
82-
}
79+
{!showSummary ? null :
80+
<div className="opblock-summary-description">
81+
{toString(resolvedSummary || summary)}
82+
</div>
83+
}
84+
</div>
8385

8486
{displayOperationId && (originalOperationId || operationId) ? <span className="opblock-summary-operation-id">{originalOperationId || operationId}</span> : null}
8587
</button>

src/style/_layout.scss

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@
305305
{
306306
font-size: 14px;
307307
font-weight: bold;
308+
@media (max-width: 768px) {
309+
font-size: 12px;
310+
}
308311

309312
min-width: 80px;
310313
padding: 6px 0;
@@ -333,23 +336,20 @@
333336

334337
word-break: break-word;
335338

336-
padding: 0 10px;
337-
338339
@include text_code();
339340

340341
}
341342

342343
.opblock-summary-path
343344
{
344345
flex-shrink: 0;
345-
max-width: calc(100% - 110px - 15rem);
346346
}
347347

348348
@media (max-width: 640px) {
349349
.opblock-summary-path
350350
{
351-
flex-shrink: 1;
352-
max-width: 100%;
351+
flex-shrink: 1;
352+
max-width: 100%;
353353
}
354354
}
355355

@@ -367,13 +367,31 @@
367367
{
368368
font-size: 13px;
369369

370-
flex: 1 1 auto;
371-
372370
word-break: break-word;
373371

374372
@include text_body();
375373
}
376374

375+
.opblock-summary-path-description-wrapper
376+
{
377+
display: flex;
378+
align-items: center;
379+
flex-wrap: wrap;
380+
gap: 0px 10px;
381+
382+
padding: 0 10px;
383+
384+
width: 100%;
385+
}
386+
387+
@media (max-width: 550px) {
388+
.opblock-summary-path-description-wrapper
389+
{
390+
flex-direction: column;
391+
align-items: start;
392+
}
393+
}
394+
377395
.opblock-summary
378396
{
379397
display: flex;
@@ -772,6 +790,10 @@
772790
{
773791
display: flex;
774792
align-items: flex-end;
793+
justify-content: space-between;
794+
flex-wrap: wrap;
795+
796+
gap: 10px;
775797

776798
> label
777799
{
@@ -792,6 +814,27 @@
792814
text-transform: uppercase;
793815
}
794816
}
817+
818+
/*
819+
Target Authorize Button in schemes wrapper
820+
This was added here to fix responsiveness issues with the authorize button
821+
within the schemes wrapper without affecting other instances of it's usage
822+
*/
823+
.auth-wrapper
824+
{
825+
flex: none;
826+
justify-content: none;
827+
828+
.authorize
829+
{
830+
padding-right: 20px;
831+
margin: 0;
832+
833+
display: flex;
834+
835+
flex-wrap: nowrap;
836+
}
837+
}
795838
}
796839
}
797840

src/style/_topbar.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@
77
{
88
display: flex;
99
align-items: center;
10+
flex-wrap: wrap;
11+
gap: 10px;
1012
}
13+
@media (max-width: 550px) {
14+
.topbar-wrapper
15+
{
16+
flex-direction: column;
17+
align-items: start;
18+
}
19+
}
20+
1121
a
1222
{
1323
font-size: 1.5em;
@@ -39,6 +49,7 @@
3949
input[type=text]
4050
{
4151
width: 100%;
52+
max-width: 100%;
4253
margin: 0;
4354

4455
border: 2px solid $topbar-download-url-wrapper-element-border-color;
@@ -93,4 +104,10 @@
93104
@include text_headline($topbar-download-url-button-font-color);
94105
}
95106
}
107+
@media (max-width: 550px) {
108+
.download-url-wrapper
109+
{
110+
width: 100%;
111+
}
112+
}
96113
}

0 commit comments

Comments
 (0)