Skip to content

Commit

Permalink
[Ui Framework] Change menu to unordered list 5x (#12104)
Browse files Browse the repository at this point in the history
* [UI Framework] Change menu to unordered list

* Add usage comments

* Update events_sandbox example

* Improve comments and regenerate css

* Improve comments
  • Loading branch information
archanid authored Jun 1, 2017
1 parent f6be1e4 commit e744b88
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 24 deletions.
11 changes: 11 additions & 0 deletions ui_framework/components/menu/_menu.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* 1. Allow this class to be applied to `ul` and `ol` elements
*/
.kuiMenu {
padding-left: 0; /* 1 */
}

.kuiMenu--contained {
border: $globalBorderThin;

Expand All @@ -6,7 +13,11 @@
}
}

/**
* 1. Allow this class to be applied to `li` elements
*/
.kuiMenuItem {
list-style: none; /* 1 */
padding: 6px 0;

& + & {
Expand Down
10 changes: 10 additions & 0 deletions ui_framework/dist/ui_framework.css
Original file line number Diff line number Diff line change
Expand Up @@ -1993,12 +1993,22 @@ body {
font-size: 14px;
font-weight: bold; }

/**
* 1. Allow class to be applied to `ul` and `ol` elements
* 2. Allow class to be applied to `li` elements
*/
.kuiMenu {
padding-left: 0;
/* 1 */ }

.kuiMenu--contained {
border: 1px solid #E4E4E4; }
.kuiMenu--contained .kuiMenuItem {
padding: 6px 10px; }

.kuiMenuItem {
list-style: none;
/* 2 */
padding: 6px 0; }
.kuiMenuItem + .kuiMenuItem {
border-top: 1px solid #E4E4E4; }
Expand Down
16 changes: 8 additions & 8 deletions ui_framework/doc_site/src/views/event/events_sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ <h2 class="kuiSubTitle">
</div>
</div>

<div class="kuiMenu kuiVerticalRhythm">
<div class="kuiMenuItem">
<ul class="kuiMenu kuiVerticalRhythm">
<li class="kuiMenuItem">
<div class="kuiEvent">
<div class="kuiEventSymbol">
<span class="kuiIcon kuiIcon--info fa-info"></span>
Expand All @@ -34,9 +34,9 @@ <h2 class="kuiSubTitle">
</div>
</div>
</div>
</div>
</li>

<div class="kuiMenuItem">
<li class="kuiMenuItem">
<div class="kuiEvent">
<div class="kuiEventSymbol">
<span class="kuiIcon kuiIcon--error fa-warning"></span>
Expand All @@ -52,9 +52,9 @@ <h2 class="kuiSubTitle">
</div>
</div>
</div>
</div>
</li>

<div class="kuiMenuItem">
<li class="kuiMenuItem">
<div class="kuiEvent">
<div class="kuiEventSymbol">
<span class="kuiIcon kuiIcon--warning fa-bolt"></span>
Expand All @@ -70,8 +70,8 @@ <h2 class="kuiSubTitle">
</div>
</div>
</div>
</div>
</div>
</li>
</ul>

</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions ui_framework/doc_site/src/views/menu/menu.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="kuiMenu">
<div class="kuiMenuItem">
<ul class="kuiMenu">
<li class="kuiMenuItem">
<p class="kuiText">Item A</p>
</div>
</li>

<div class="kuiMenuItem">
<li class="kuiMenuItem">
<p class="kuiText">Item B</p>
</div>
</li>

<div class="kuiMenuItem">
<li class="kuiMenuItem">
<p class="kuiText">Item C</p>
</div>
</div>
</li>
</ul>
16 changes: 8 additions & 8 deletions ui_framework/doc_site/src/views/menu/menu_contained.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="kuiMenu kuiMenu--contained">
<div class="kuiMenuItem">
<ul class="kuiMenu kuiMenu--contained">
<li class="kuiMenuItem">
<p class="kuiText">Item A</p>
</div>
</li>

<div class="kuiMenuItem">
<li class="kuiMenuItem">
<p class="kuiText">Item B</p>
</div>
</li>

<div class="kuiMenuItem">
<li class="kuiMenuItem">
<p class="kuiText">Item C</p>
</div>
</div>
</li>
</ul>

0 comments on commit e744b88

Please sign in to comment.