Browse Source

Continuing to fix tertiary buttons

pull/13/head
Jack Lukic 12 years ago
parent
commit
6ed0ee6c3a
8 changed files with 118 additions and 7 deletions
  1. 2
      build/minified/elements/button.min.css
  2. 2
      build/packaged/semantic.min.css
  3. 11
      build/uncompressed/elements/button.css
  4. 8
      node/src/documents/elements/button.html
  5. 11
      node/src/files/components/semantic/elements/button.css
  6. 42
      node/src/files/javascript/button.js
  7. 37
      node/src/files/javascript/menu.js
  8. 12
      src/elements/button.less

2
build/minified/elements/button.min.css
File diff suppressed because it is too large
View File

2
build/packaged/semantic.min.css
File diff suppressed because it is too large
View File

11
build/uncompressed/elements/button.css

@ -474,6 +474,17 @@
.ui.buttons.tertiary .button:first-child {
border-left: none;
}
.ui.button.tertiary.active {
opacity: 0.9 !important;
}
.ui.button.tertiary.hover,
.ui.button.tertiary:hover {
opacity: 0.8 !important;
}
.ui.button.tertiary.down,
.ui.button.tertiary:active {
opacity: 1 !important;
}
/*--------------
Labeled Icon
---------------*/

8
node/src/documents/elements/button.html

@ -288,10 +288,10 @@ type : 'UI Element'
<div class="example">
<h4 class="ui header">Ordinality</h4>
<p>A button can be formatted to appear more or less noticable</p>
<div class="ui secondary buttons">
<div class="ui red button">One</div>
<div class="ui blue button">Two</div>
<div class="ui green button">Three</div>
<div class="ui teal secondary buttons">
<div class="ui button">One</div>
<div class="ui button">Two</div>
<div class="ui button">Three</div>
</div>
</div>
<div class="another example">

11
node/src/files/components/semantic/elements/button.css

@ -474,6 +474,17 @@
.ui.buttons.tertiary .button:first-child {
border-left: none;
}
.ui.button.tertiary.active {
opacity: 0.9 !important;
}
.ui.button.tertiary.hover,
.ui.button.tertiary:hover {
opacity: 0.8 !important;
}
.ui.button.tertiary.down,
.ui.button.tertiary:active {
opacity: 1 !important;
}
/*--------------
Labeled Icon
---------------*/

42
node/src/files/javascript/button.js

@ -0,0 +1,42 @@
semantic.button = {};
// ready event
semantic.button.ready = function() {
// selector cache
var
$buttons = $('.ui.buttons .button'),
$button = $('.ui.button').not($buttons),
// alias
handler = {
activate: function() {
$(this)
.addClass('active')
.siblings()
.removeClass('active')
;
}
}
;
$buttons
.on('click', handler.activate)
;
$button
.state({
states: {
active: true
}
})
;
};
// attach ready event
$(document)
.ready(semantic.button.ready)
;

37
node/src/files/javascript/menu.js

@ -0,0 +1,37 @@
semantic.table = {};
// ready event
semantic.table.ready = function() {
// selector cache
var
$menuItem = $('.menu a.item, .menu .link.item'),
// alias
handler = {
activate: function() {
if(!$(this).hasClass('dropdown')) {
$(this)
.addClass('active')
.closest('.ui.menu')
.find('.item')
.not($(this))
.removeClass('active')
;
}
}
}
;
$menuItem
.on('click', handler.activate)
;
};
// attach ready event
$(document)
.ready(semantic.table.ready)
;

12
src/elements/button.less

@ -584,7 +584,17 @@
.ui.buttons.tertiary .button:first-child {
border-left: none;
}
.ui.button.tertiary.active {
opacity: 0.9 !important;
}
.ui.button.tertiary.hover,
.ui.button.tertiary:hover {
opacity: 0.8 !important;
}
.ui.button.tertiary.down,
.ui.button.tertiary:active {
opacity: 1 !important;
}
/*--------------
Labeled Icon
---------------*/

Loading…
Cancel
Save