Skip to content

Commit dc76339

Browse files
authored
Merge pull request SolidOS#186 from solid/tab-style-3
Fix flex direction of ul
2 parents 2193cba + 55c23d2 commit dc76339

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/tabs.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,16 @@ UI.tabs.tabWidget = function (options) {
8888
(vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';')
8989

9090
navElement = rootElement.appendChild(dom.createElement('nav'))
91-
navElement.setAttribute('style', 'margin: 0;')
91+
navElement.style = 'margin: 0;'
9292

9393
mainElement = rootElement.appendChild(dom.createElement('main'))
9494

9595
mainElement.setAttribute('style', 'margin: 0; width:100%; height: 100%;') // override tabbedtab.css
9696
tabContainer = navElement.appendChild(dom.createElement('ul'))
97-
tabContainer.style = 'list-style-type: none;' // No bullet please
97+
tabContainer.style = 'list-style-type: none;' + // No bullet please ...
98+
'display: flex; height: 100%; width: 100%; flex-direction: ' +
99+
(vertical ? 'column' : 'row') // + (flipped ? '-reverse;' : ';')
100+
// Never flip the direction of readuing the tabs, assuming people read left to right and top to bottom
98101

99102
tabElement = 'li'
100103

src/test/test-tabs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h2>Test Tabs widget</h2>
7171
ui:orientation 0; ui:ordered true;
7272
ui:subject &lt;#it&gt;.
7373
&lt;#it&gt;
74-
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://cnn.com/&gt; &lt;https://webfoundation.org/&gt; ) .
74+
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://inrupt.com/&gt; &lt;https://webfoundation.org/&gt; ) .
7575

7676
#ends
7777

0 commit comments

Comments
 (0)