Skip to content

Commit

Permalink
feat(VisualEditor): ✨ hide less useful buttons when width is limited
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed May 17, 2024
1 parent cae19d7 commit 820d612
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions skinStyles/extensions/VisualEditor/ext.visualEditor.core.less
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,15 @@
/* Responsive handling */
.ve-init-mw-desktopArticleTarget-toolbar {
> .oo-ui-toolbar-bar {
> .oo-ui-toolbar-tools:first-child {
display: inline-block;
max-width: ~'calc( 100% - 250px )';
white-space: nowrap;
> .oo-ui-toolbar-tools {
// Needed to hide overflow tools
background: var( --color-surface-0 );

&:first-child {
display: inline-block;
max-width: ~'calc( 100% - 250px )';
white-space: nowrap;
}
}

> .oo-ui-toolbar-actions {
Expand All @@ -395,3 +400,14 @@
}
}
}

/* Hide less useful buttons on small viewport */
@media ( max-width: @max-width-breakpoint-tablet ) {
.ve-ui-toolbar-group {
&-format,
&-style,
&-help {
display: none;
}
}
}

0 comments on commit 820d612

Please sign in to comment.