Browse Source

Adds accordion icon positioning into variables

pull/1129/head
jlukic 10 years ago
parent
commit
1c8253725d
4 changed files with 18 additions and 12 deletions
  1. 4
      server/files/javascript/semantic.js
  2. 8
      src/definitions/modules/accordion.less
  3. 10
      src/themes/packages/default/modules/accordion.overrides
  4. 8
      src/themes/packages/default/modules/accordion.variables

4
server/files/javascript/semantic.js

@ -116,12 +116,12 @@ semantic.ready = function() {
? $exampleSet.index($lastExample) ? $exampleSet.index($lastExample)
: $exampleSet.size(), : $exampleSet.size(),
$examples = $exampleSet.slice(firstIndex, lastIndex + 1), $examples = $exampleSet.slice(firstIndex, lastIndex + 1),
activeClass = (index == 0)
activeClass = (index === 0)
? 'active ' ? 'active '
: 'active ' : 'active '
; ;
html += '<div class="item">'; html += '<div class="item">';
html += ' <i class="dropdown icon"></i><a class="'+activeClass+'title"><b>' + $(this).text() + '</b></a>';
html += '<a class="'+activeClass+'title"><i class="dropdown icon"></i> <b>' + $(this).text() + '</b></a>';
html += '<div class="'+activeClass+'content menu">'; html += '<div class="'+activeClass+'content menu">';
$examples $examples
.each(function() { .each(function() {

8
src/definitions/modules/accordion.less

@ -62,9 +62,17 @@
margin: @iconMargin; margin: @iconMargin;
transition: @iconTransition; transition: @iconTransition;
vertical-align: @iconVerticalAlign; vertical-align: @iconVerticalAlign;
transform: @iconTransform;
} }
/*******************************
States
*******************************/
.ui.accordion .active.title .dropdown.icon,
.ui.accordion .accordion .active.title .dropdown.icon {
transform: @activeIconTransform;
}
/******************************* /*******************************
Types Types

10
src/themes/packages/default/modules/accordion.overrides

@ -25,14 +25,4 @@
.ui.accordion .title .dropdown.icon:before, .ui.accordion .title .dropdown.icon:before,
.ui.accordion .accordion .title .dropdown.icon:before { .ui.accordion .accordion .title .dropdown.icon:before {
content: '\f0da'/*rtl:'\f0d9'*/; content: '\f0da'/*rtl:'\f0d9'*/;
}
/* Icon Rotation */
.ui.accordion .title .dropdown.icon,
.ui.accordion .accordion .title .dropdown.icon {
transform: rotate(0deg);
}
.ui.accordion .active.title .dropdown.icon,
.ui.accordion .accordion .active.title .dropdown.icon {
transform: rotate(90deg);
} }

8
src/themes/packages/default/modules/accordion.variables

@ -24,6 +24,8 @@
; ;
@iconVerticalAlign: baseline; @iconVerticalAlign: baseline;
@iconTransform: rotate(0deg);
/* Child Accordion */ /* Child Accordion */
@childAccordionMargin: 1em 0em 0em; @childAccordionMargin: 1em 0em 0em;
@childAccordionPadding: 0em; @childAccordionPadding: 0em;
@ -32,6 +34,12 @@
@contentMargin: 0em; @contentMargin: 0em;
@contentPadding: 0.5em 0em 1em; @contentPadding: 0.5em 0em 1em;
/*-------------------
States
--------------------*/
@activeIconTransform: rotate(90deg);
/*------------------- /*-------------------
Variations Variations
--------------------*/ --------------------*/

Loading…
Cancel
Save