From 06bf3023ffda9de658f460b78a06c8fcc59812f3 Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 10 Sep 2014 13:49:37 -0400 Subject: [PATCH] Fix vertical input sizes, positioning inside menus. Add strict mode all modules --- src/definitions/collections/menu.less | 17 ++++++++--------- src/definitions/modules/accordion.js | 2 ++ src/definitions/modules/chatroom.js | 2 ++ src/definitions/modules/checkbox.js | 2 ++ src/definitions/modules/dimmer.js | 4 +++- src/definitions/modules/dropdown.js | 2 ++ src/definitions/modules/dropdown.less | 2 ++ src/definitions/modules/modal.js | 2 ++ src/definitions/modules/nag.js | 2 ++ src/definitions/modules/popup.js | 2 ++ src/definitions/modules/rating.js | 2 ++ src/definitions/modules/search.js | 2 ++ src/definitions/modules/shape.js | 2 ++ src/definitions/modules/sticky.js | 2 ++ src/definitions/modules/tab.js | 2 ++ src/definitions/modules/transition.js | 2 ++ src/definitions/modules/video.js | 2 ++ .../packages/default/collections/menu.variables | 2 +- .../packages/default/modules/dropdown.variables | 1 + 19 files changed, 43 insertions(+), 11 deletions(-) diff --git a/src/definitions/collections/menu.less b/src/definitions/collections/menu.less index f216a5af3..1ab52aef3 100755 --- a/src/definitions/collections/menu.less +++ b/src/definitions/collections/menu.less @@ -174,11 +174,9 @@ .ui.menu:not(.vertical) .item > .button { position: relative; top: @buttonOffset; - margin: -@buttonVerticalPadding 0; padding-bottom: @buttonVerticalPadding; padding-top: @buttonVerticalPadding; - font-size: @buttonSize; } @@ -187,14 +185,15 @@ Inputs ---------------*/ +.ui.menu .item > .input { + width: 100%; +} .ui.menu:not(.vertical) .item > .input { position: relative; top: @inputOffset; - margin: @inputVerticalMargin 0em; - width: 100%; } -.ui.menu:not(.vertical) .item > .input input { +.ui.menu .item > .input input { font-size: @inputSize; padding-top: @inputVerticalPadding; padding-bottom: @inputVerticalPadding; @@ -207,21 +206,21 @@ } /* Resizes */ -.ui.small.menu:not(.vertical) .item > .input input { +.ui.small.menu .item > .input input { top: @smallInputOffset; padding-top: @smallInputVerticalPadding; padding-bottom: @smallInputVerticalPadding; } -.ui.large.menu:not(.vertical) .item > .input input { +.ui.large.menu .item > .input input { top: @largeInputOffset; padding-bottom: @largeInputVerticalPadding; padding-top: @largeInputVerticalPadding; } -.ui.large.menu:not(.vertical) .item .action.input > .button { +.ui.large.menu .item .action.input > .button { padding: 0.9em; } -.ui.large.menu:not(.vertical) .item .action.input > .button > .icon { +.ui.large.menu .item .action.input > .button > .icon { padding-top: 0.8em; } diff --git a/src/definitions/modules/accordion.js b/src/definitions/modules/accordion.js index 882f79bd9..e53272193 100755 --- a/src/definitions/modules/accordion.js +++ b/src/definitions/modules/accordion.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.fn.accordion = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/chatroom.js b/src/definitions/modules/chatroom.js index 8221d03d9..aaf32bed3 100755 --- a/src/definitions/modules/chatroom.js +++ b/src/definitions/modules/chatroom.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.fn.chatroom = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index 482544fe4..502702910 100755 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -11,6 +11,8 @@ ;(function ( $, window, document, undefined ) { +"use strict"; + $.fn.checkbox = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/dimmer.js b/src/definitions/modules/dimmer.js index 21f146686..bd47a2f35 100755 --- a/src/definitions/modules/dimmer.js +++ b/src/definitions/modules/dimmer.js @@ -11,6 +11,8 @@ ;(function ( $, window, document, undefined ) { +"use strict"; + $.fn.dimmer = function(parameters) { var $allModules = $(this), @@ -579,7 +581,7 @@ $.fn.dimmer.settings = { className : { active : 'active', - dimmable : 'ui dimmable', + dimmable : 'dimmable', dimmed : 'dimmed', disabled : 'disabled', pageDimmer : 'page', diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index b4d27b717..fb00c2143 100755 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -11,6 +11,8 @@ ;(function ( $, window, document, undefined ) { +"use strict"; + $.fn.dropdown = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index 4b1e4b58b..8e4d9399d 100755 --- a/src/definitions/modules/dropdown.less +++ b/src/definitions/modules/dropdown.less @@ -46,6 +46,7 @@ cursor: auto; position: absolute; display: none; + outline: none; top: 100%; margin: @menuMargin; @@ -331,6 +332,7 @@ select.ui.dropdown { display: none; } .ui.selection.dropdown .menu > .item { + border-top: @selectionItemDivider; padding-left: @selectionHorizontalPadding !important; /* Add in spacing for scroll bar */ padding-right: calc(@selectionHorizontalPadding + 1em) !important; diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index ed739695f..173f78c4f 100755 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -11,6 +11,8 @@ ;(function ( $, window, document, undefined ) { +"use strict"; + $.fn.modal = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/nag.js b/src/definitions/modules/nag.js index b3f09ce53..8ccb3a74c 100755 --- a/src/definitions/modules/nag.js +++ b/src/definitions/modules/nag.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.fn.nag = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index e9f128910..ad55ebd18 100755 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.fn.popup = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/rating.js b/src/definitions/modules/rating.js index ef7b3d702..cb054d050 100755 --- a/src/definitions/modules/rating.js +++ b/src/definitions/modules/rating.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.fn.rating = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/search.js b/src/definitions/modules/search.js index f282173ee..cf987f5f0 100755 --- a/src/definitions/modules/search.js +++ b/src/definitions/modules/search.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.fn.search = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/shape.js b/src/definitions/modules/shape.js index d30e06d44..b6d72bf3c 100755 --- a/src/definitions/modules/shape.js +++ b/src/definitions/modules/shape.js @@ -11,6 +11,8 @@ ;(function ( $, window, document, undefined ) { +"use strict"; + $.fn.shape = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/sticky.js b/src/definitions/modules/sticky.js index 84532cd32..f50c5bc24 100755 --- a/src/definitions/modules/sticky.js +++ b/src/definitions/modules/sticky.js @@ -11,6 +11,8 @@ ;(function ( $, window, document, undefined ) { +"use strict"; + $.fn.sticky = function(parameters) { var $allModules = $(this), diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js index cdc00617d..d49685679 100755 --- a/src/definitions/modules/tab.js +++ b/src/definitions/modules/tab.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.tab = $.fn.tab = function(parameters) { var diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index 113cf4a76..4a5448b0a 100755 --- a/src/definitions/modules/transition.js +++ b/src/definitions/modules/transition.js @@ -11,6 +11,8 @@ ;(function ( $, window, document, undefined ) { +"use strict"; + $.fn.transition = function() { var $allModules = $(this), diff --git a/src/definitions/modules/video.js b/src/definitions/modules/video.js index 15a4d9ff7..481865109 100755 --- a/src/definitions/modules/video.js +++ b/src/definitions/modules/video.js @@ -11,6 +11,8 @@ ;(function ($, window, document, undefined) { +"use strict"; + $.fn.video = function(parameters) { var diff --git a/src/themes/packages/default/collections/menu.variables b/src/themes/packages/default/collections/menu.variables index 8ee62537c..77249df25 100755 --- a/src/themes/packages/default/collections/menu.variables +++ b/src/themes/packages/default/collections/menu.variables @@ -99,7 +99,7 @@ @inputSize: 1em; @inputVerticalMargin: -0.6em; @inputOffset: 0em; -@inputVerticalPadding: 0.35em; +@inputVerticalPadding: 0.4em; @smallInputOffset: 0em; @smallInputVerticalPadding: 0.4em; diff --git a/src/themes/packages/default/modules/dropdown.variables b/src/themes/packages/default/modules/dropdown.variables index 4fb1dcb60..c684bd937 100755 --- a/src/themes/packages/default/modules/dropdown.variables +++ b/src/themes/packages/default/modules/dropdown.variables @@ -99,6 +99,7 @@ b Types @selectionMinWidth: 180px; @selectionBackground: @white; @selectionDisplay: inline-block; +@selectionItemDivider: 1px solid rgba(0, 0, 0, 0.05); @selectionVerticalPadding: 0.8em; @selectionHorizontalPadding: 1.1em; @selectionPadding: @selectionVerticalPadding @selectionHorizontalPadding;