diff --git a/index.css b/index.css index 6ff6ed4..cfa1be3 100644 --- a/index.css +++ b/index.css @@ -60,24 +60,19 @@ section { flex-shrink: 0; } section.config { - min-height: 30px; font-size: 10px; background: #eee; flex: 0; - padding: 10px 10px 0 10px; - display: flex; - flex-direction: row; -} -section.config:last-of-type { - padding-bottom: 10px; -} -section.config + section.config { - padding-top: 0; + padding: 10px; + display: grid; + grid-column-gap: 5px; + grid-row-gap: 5px; + grid-template-columns: auto auto auto auto; } section.config > * { - flex: 1; text-align: center; padding: 0; + white-space: nowrap; } section.select-list { overflow: auto; @@ -164,7 +159,7 @@ section.select-list .details { } footer { flex: 0; - padding: 6px 10px; + padding: 5px 10px; font-size: 10px; text-align: center; background: #e4e4e4; @@ -190,7 +185,7 @@ select { all: unset; width: 9em; padding: 0 .5ex; - border: 1px solid transparent; + border: 1px solid #e4e4e4; border-radius: 3px; white-space: nowrap; overflow: hidden; @@ -206,14 +201,15 @@ input[type="number"] { width: 4em; margin-left: .5ex; padding: 0 .5ex; - border: 1px solid transparent; + border: 1px solid #e4e4e4; + border-radius: 3px; text-align: left; } input[type="number"]:hover, input[type="number"]:focus, select:hover, select:focus { - border-color: #e4e4e4; + border-color: #777; } pre, textarea, diff --git a/index.html b/index.html index ee8f70e..0cd182e 100755 --- a/index.html +++ b/index.html @@ -100,16 +100,9 @@

- +

-

- - -

- - -

diff --git a/index.js b/index.js index e4fd938..1ae68d8 100644 --- a/index.js +++ b/index.js @@ -33,7 +33,11 @@ function selectFont() { font = 'input'; } - console.log(font_data[font]); + if (font_data[font].rendering === 'bitmap') { + $('.CodeMirror').addClass('no-smooth'); + } else { + $('.CodeMirror').removeClass('no-smooth'); + } if (font === 'input') { $('pre').css({ fontFamily: 'Input Mono, monospace' }); @@ -64,15 +68,6 @@ function setSpacing() { $('.CodeMirror').css({ lineHeight: spacing }); document.cookie = 'spacing=' + spacing + ';max-age=172800'; } -function setAntialiasing() { - if ($('#aliasing').is(':checked')) { - $('.CodeMirror').removeClass('no-smooth'); - document.cookie = 'antialiasing=smooth;max-age=172800'; - } else { - $('.CodeMirror').addClass('no-smooth'); - document.cookie = 'antialiasing=no-smooth;max-age=172800'; - } -} function selectLanguage() { var lang = $('#select-language').val(); @@ -199,7 +194,6 @@ function decreaseFontSize() { $(document).ready(function() { var cookieValueSpacing = document.cookie.replace(/(?:(?:^|.*;\s*)spacing\s*=\s*([^;]*).*$)|^.*$/, '$1'); var cookieValueSize = document.cookie.replace(/(?:(?:^|.*;\s*)size\s*=\s*([^;]*).*$)|^.*$/, '$1'); - var cookieValueAntialiasing = document.cookie.replace(/(?:(?:^|.*;\s*)antialiasing\s*=\s*([^;]*).*$)|^.*$/, '$1'); var cookieValueTheme = document.cookie.replace(/(?:(?:^|.*;\s*)theme\s*=\s*([^;]*).*$)|^.*$/, '$1'); var cookieValueLanguage = document.cookie.replace(/(?:(?:^|.*;\s*)language\s*=\s*([^;]*).*$)|^.*$/, '$1'); @@ -209,11 +203,6 @@ $(document).ready(function() { if (cookieValueSize !== '') { $('#size').val(cookieValueSize); } - if (cookieValueAntialiasing === 'smooth') { - $('#aliasing').prop('checked', true); - } else if (cookieValueAntialiasing === 'no-smooth') { - $('#aliasing').prop('checked', false); - } if (cookieValueTheme !== '') { $('#select-theme').val(cookieValueTheme); } @@ -224,7 +213,6 @@ $(document).ready(function() { selectTheme(); setSize(); setSpacing(); - setAntialiasing(); selectLanguage(); renderSelectList();