Sfoglia il codice sorgente

Set options container height only on more than 8 options

simov 8 anni fa
parent
commit
c782cd4b8f
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      content/popup.js
  2. 1 1
      css/popup.css

+ 1 - 1
content/popup.js

@@ -143,7 +143,7 @@ m.mount(document.querySelector('body'), {
           m('select.mdl-shadow--2dp', {onchange: events.compiler.name}, Object.keys(state.compilers).map((name) =>
             m('option', {selected: state.compiler === name}, name)
           )),
-          m('.scroll', {class: state.compiler},
+          m('.scroll', {class: Object.keys(state.options).length > 8 ? 'max' : undefined},
             m('.mdl-grid', Object.keys(state.options || [])
               .filter((key) => typeof state.options[key] === 'boolean')
               .map((key) =>

+ 1 - 1
css/popup.css

@@ -50,7 +50,7 @@ button:nth-child(2n+4) { float: right; margin-top: 20px; }
   overflow-y: auto;
   overflow-x: hidden;
 }
-.scroll.showdown {
+.scroll.max {
   height: 324px;
 }
 .scroll .mdl-grid { padding: 0 0 8px 0; }