]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix rounded tabs
authorJeremy Thomas <bbxdesign@gmail.com>
Mon, 4 Dec 2017 13:45:14 +0000 (13:45 +0000)
committerJeremy Thomas <bbxdesign@gmail.com>
Mon, 4 Dec 2017 13:45:14 +0000 (13:45 +0000)
docs/css/bulma-docs.css
docs/documentation/components/tabs.html
sass/components/tabs.sass

index 6816530b2695b00f17d9d8ddaf7f619c3f6b4997..059b1097ca8a5379d31f48a7511278d5242eb872 100644 (file)
@@ -7406,22 +7406,10 @@ label.panel-block:hover {
   border-radius: 3px 0 0 3px;
 }
 
-.tabs.is-toggle li:first-child a.is-rounded {
-  border-top-left-radius: 290486px;
-  border-bottom-left-radius: 290486px;
-  padding-left: 1.25em;
-}
-
 .tabs.is-toggle li:last-child a {
   border-radius: 0 3px 3px 0;
 }
 
-.tabs.is-toggle li:last-child a.is-rounded {
-  border-top-right-radius: 290486px;
-  border-bottom-right-radius: 290486px;
-  padding-right: 1.25em;
-}
-
 .tabs.is-toggle li.is-active a {
   background-color: #3273dc;
   border-color: #3273dc;
@@ -7433,6 +7421,18 @@ label.panel-block:hover {
   border-bottom: none;
 }
 
+.tabs.is-toggle.is-toggle-rounded li:first-child a {
+  border-bottom-left-radius: 290486px;
+  border-top-left-radius: 290486px;
+  padding-left: 1.25em;
+}
+
+.tabs.is-toggle.is-toggle-rounded li:last-child a {
+  border-bottom-right-radius: 290486px;
+  border-top-right-radius: 290486px;
+  padding-right: 1.25em;
+}
+
 .tabs.is-small {
   font-size: 0.75rem;
 }
index daa28c6e6be76dc869c41d46c1a498aa7f6726e7..97dc2d2b60bf89a4ebd9acdd92b5db69761ebbff 100644 (file)
@@ -164,6 +164,37 @@ doc-subtab: tabs
 </div>
 {% endcapture %}
 
+{% capture tabs_toggle_rounded_example %}
+<div class="tabs is-toggle is-toggle-rounded">
+  <ul>
+    <li class="is-active">
+      <a>
+        <span class="icon is-small"><i class="fa fa-image"></i></span>
+        <span>Pictures</span>
+      </a>
+    </li>
+    <li>
+      <a>
+        <span class="icon is-small"><i class="fa fa-music"></i></span>
+        <span>Music</span>
+      </a>
+    </li>
+    <li>
+      <a>
+        <span class="icon is-small"><i class="fa fa-film"></i></span>
+        <span>Videos</span>
+      </a>
+    </li>
+    <li>
+      <a>
+        <span class="icon is-small"><i class="fa fa-file-text-o"></i></span>
+        <span>Documents</span>
+      </a>
+    </li>
+  </ul>
+</div>
+{% endcapture %}
+
 {% capture tabs_fullwidth_example %}
 <div class="tabs is-fullwidth">
   <ul>
@@ -385,6 +416,14 @@ doc-subtab: tabs
 
     {% include snippet.html content=tabs_toggle_example horizontal=true more=true %}
 
+    {% include elements/new-tag.html version="0.6.2" %}
+
+    <p class="content">
+      If you use both <code>is-toggle</code> and <code>is-toggle-rounded</code>, the first and last items will be <strong>rounded</strong>.
+    </p>
+
+    {% include snippet.html content=tabs_toggle_rounded_example horizontal=true more=true %}
+
     <p class="content">
       If you want the tabs to take up the <strong>whole width</strong> available, use <code>is-fullwidth</code>.
     </p>
index b073874a86efab80bb53b838f10a8f5c7f5356e4..ccbf6797337f84b61e0654c40b8101f9fb5f25b6 100644 (file)
@@ -122,16 +122,8 @@ $tabs-toggle-link-active-color: $link-invert !default
         margin-left: -#{$tabs-toggle-link-border-width}
       &:first-child a
         border-radius: $tabs-toggle-link-radius 0 0 $tabs-toggle-link-radius
-        &.is-rounded
-          border-top-left-radius: $radius-rounded
-          border-bottom-left-radius: $radius-rounded
-          padding-left: 1.25em
       &:last-child a
         border-radius: 0 $tabs-toggle-link-radius $tabs-toggle-link-radius 0
-        &.is-rounded
-          border-top-right-radius: $radius-rounded
-          border-bottom-right-radius: $radius-rounded
-          padding-right: 1.25em
       &.is-active
         a
           background-color: $tabs-toggle-link-active-background-color
@@ -140,6 +132,16 @@ $tabs-toggle-link-active-color: $link-invert !default
           z-index: 1
     ul
       border-bottom: none
+    &.is-toggle-rounded
+      li
+        &:first-child a
+          border-bottom-left-radius: $radius-rounded
+          border-top-left-radius: $radius-rounded
+          padding-left: 1.25em
+        &:last-child a
+          border-bottom-right-radius: $radius-rounded
+          border-top-right-radius: $radius-rounded
+          padding-right: 1.25em
   // Sizes
   &.is-small
     font-size: $size-small