commit b16a4fa118f2b3adb21974f35758894b19c2f927 parent 1040de1ee80c4a7052d4585f33561ab921ebe37d Author: Henry Unite <unitehenry@gmail.com> Date: Tue, 8 Sep 2020 08:55:12 -0400 hide font options observeer Diffstat:
| M | src/striveneditor.css | | | 6 | ------ |
| M | src/striveneditor.js | | | 9 | +++++++++ |
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/striveneditor.css b/src/striveneditor.css @@ -224,12 +224,6 @@ background-color: transparent; } -@media (max-width: 500px) { - .striven-editor .se-toolbar .se-toolbar-selection { - display: none; - } -} - /* .striven-editor .se-toolbar .se-toolbar-selection .se-toolbar-option { border: 1px solid #ddd; diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -1854,6 +1854,15 @@ export default class StrivenEditor { } }); + [...that.toolbar.getElementsByClassName('se-toolbar-selection')] + .forEach(sl => { + sl.style.display = isResponsive ? 'none' : null; + const { nextElementSibling } = sl; + if(nextElementSibling.classList.contains('se-divider-section')) { + nextElementSibling.style.display = isResponsive ? 'none' : null; + } + }) + } function setResponsive() {