Container broken layout

This commit is contained in:
Jeremy Thomas
2018-04-09 16:15:58 +01:00
parent f0074aa339
commit 25d0ea1136
18 changed files with 1262 additions and 1244 deletions

View File

@@ -36,6 +36,38 @@
"name": "Sizes", "name": "Sizes",
"path": "/documentation/columns/sizes" "path": "/documentation/columns/sizes"
}, },
"form": {
"name": "Form",
"path": "/documentation/form"
},
"form-general": {
"name": "General",
"path": "/documentation/form/general"
},
"form-input": {
"name": "Input",
"path": "/documentation/form/input"
},
"form-textarea": {
"name": "Textarea",
"path": "/documentation/form/textarea"
},
"form-select": {
"name": "Select",
"path": "/documentation/form/select"
},
"form-checkbox": {
"name": "Checkbox",
"path": "/documentation/form/checkbox"
},
"form-radio": {
"name": "Radio",
"path": "/documentation/form/radio"
},
"form-file": {
"name": "File",
"path": "/documentation/form/file"
},
"elements": { "elements": {
"name": "Elements", "name": "Elements",
"path": "/documentation/elements" "path": "/documentation/elements"
@@ -131,6 +163,7 @@
}, },
"order": { "order": {
"columns": ["columns-basics", "columns-sizes", "columns-responsiveness", "columns-nesting", "columns-gap", "columns-options"], "columns": ["columns-basics", "columns-sizes", "columns-responsiveness", "columns-nesting", "columns-gap", "columns-options"],
"form": ["form-general", "form-input", "form-textarea", "form-select", "form-checkbox", "form-radio", "form-file"],
"elements": ["elements-box", "elements-button", "elements-content", "elements-delete", "elements-icon", "elements-image", "elements-notification", "elements-progress", "elements-table", "elements-tag", "elements-title"], "elements": ["elements-box", "elements-button", "elements-content", "elements-delete", "elements-icon", "elements-image", "elements-notification", "elements-progress", "elements-table", "elements-tag", "elements-title"],
"components": ["components-breadcrumb", "components-card", "components-dropdown", "components-menu", "components-message", "components-modal", "components-navbar", "components-pagination", "components-panel", "components-tabs"] "components": ["components-breadcrumb", "components-card", "components-dropdown", "components-menu", "components-message", "components-modal", "components-navbar", "components-pagination", "components-panel", "components-tabs"]
} }

View File

@@ -1,5 +1,5 @@
<div id="carboncontainer"> <div id="carboncontainer">
<div id="carbon" class="box"> <div id="carbon">
<script> <script>
var _0xa6d2 = [ var _0xa6d2 = [
'\x73\x63\x72\x69\x70\x74', '\x73\x63\x72\x69\x70\x74',

View File

@@ -0,0 +1,11 @@
</div>
</div>
<aside class="bd-side">
{% if include.show_carbon %}
{% include carbon.html %}
{% endif %}
</aside>
</div>
</div>
</main>

View File

@@ -0,0 +1,6 @@
<main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container">
<div class="bd-duo">
<div class="bd-lead">
<div class="bd-content">

View File

@@ -80,6 +80,7 @@ route: documentation
colors=page.meta.colors colors=page.meta.colors
sizes=page.meta.sizes sizes=page.meta.sizes
variables=page.meta.variables variables=page.meta.variables
experimental=page.meta.experimental
%} %}
{% endif %} {% endif %}
</header> </header>
@@ -92,8 +93,10 @@ route: documentation
</div> </div>
<aside class="bd-side"> <aside class="bd-side">
{% unless page.hide_carbon %}
{% include carbon.html %} {% include carbon.html %}
</aside> {% endunless %}
</aside> </aside>
</div> </div>
</div>
</main> </main>

View File

@@ -2,8 +2,12 @@ svg
max-height: 100% max-height: 100%
max-width: 100% max-width: 100%
$carbon-space: 15px $carbon-spacing: 1rem
$carbon-width: 300px $carbon-shadow-size: 0.75rem
$carbon-height: 100px
$carbon-image-height: 100px
$carbon-image-width: 130px
$carbon-poweredby-height: 20px
#carboncontainer #carboncontainer
align-items: center align-items: center
@@ -12,16 +16,17 @@ $carbon-width: 300px
margin-left: auto margin-left: auto
margin-right: auto margin-right: auto
max-width: $carbon-width max-width: $carbon-width
min-height: 120px + ($carbon-space * 2) min-height: 120px
min-width: 280px min-width: 280px
#carbon #carbon
flex-grow: 1 flex-grow: 1
min-height: 100px + ($carbon-space * 2) min-height: $carbon-height
padding: 0 padding: 0
position: relative position: relative
&:hover &:hover
box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px $primary background-color: $white
box-shadow: 0 0 0 $carbon-shadow-size $white
+tablet +tablet
width: $carbon-width width: $carbon-width
@@ -32,36 +37,44 @@ $carbon-width: 300px
span span
display: block display: block
.carbon-wrap .carbon-wrap
min-height: 130px min-height: $carbon-height
position: relative position: relative
&:hover
.carbon-img
opacity: 0.9
.carbon-img .carbon-img
bottom: 0 bottom: 0
float: left float: left
left: 0 left: 0
min-height: 130px min-height: $carbon-height
padding: 15px 0 15px 15px padding: 0
position: absolute position: absolute
top: 0 top: 0
width: 145px width: calc(#{$carbon-image-width} + #{$carbon-spacing})
img img
display: block display: block
height: 100px height: $carbon-image-height
width: 130px width: $carbon-image-width
&:hover &:hover
opacity: 0.9 & + .carbon-text
color: $link
&:active &:active
opacity: 0.8 opacity: 0.8
a:hover
text-decoration: underline
.carbon-text .carbon-text
display: block display: block
color: $text-strong color: $text-strong
line-height: 20px line-height: 20px
padding: 15px 15px 35px 160px min-height: $carbon-height
padding: 0 0 $carbon-poweredby-height calc(#{$carbon-image-width} + #{$carbon-spacing})
&:hover
color: $link
.carbon-poweredby .carbon-poweredby
bottom: 10px bottom: 0
color: $text-light color: $text-light
display: inline display: inline
font-size: $size-small font-size: $size-small
line-height: $carbon-poweredby-height
position: absolute position: absolute
right: 10px right: 0
&:hover
text-decoration: underline

View File

@@ -75,7 +75,7 @@
.bd-prev-next .bd-prev-next
display: flex display: flex
.bd-side .bd-side
flex: 0 0 300px flex: 0 0 calc(#{$carbon-width} + 1.5rem)
+desktop +desktop
.bd-main .bd-main

View File

@@ -12,6 +12,8 @@ $bleeding-red: #CA1F26
$star: #FFD257 $star: #FFD257
$rss: #f26522 $rss: #f26522
$carbon-width: 300px
@import "../bulma" @import "../bulma"
@import "./_sass/main" @import "./_sass/main"
@import "./_sass/highlight" @import "./_sass/highlight"

View File

@@ -9582,7 +9582,7 @@ label.panel-block:hover {
display: flex; display: flex;
} }
.bd-side { .bd-side {
flex: 0 0 300px; flex: 0 0 calc(300px + 1.5rem);
} }
} }
@@ -9879,19 +9879,20 @@ svg {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
max-width: 300px; max-width: 300px;
min-height: 150px; min-height: 120px;
min-width: 280px; min-width: 280px;
} }
#carbon { #carbon {
flex-grow: 1; flex-grow: 1;
min-height: 130px; min-height: 100px;
padding: 0; padding: 0;
position: relative; position: relative;
} }
#carbon:hover { #carbon:hover {
box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px #00d1b2; background-color: white;
box-shadow: 0 0 0 0.75rem white;
} }
@media screen and (min-width: 769px), print { @media screen and (min-width: 769px), print {
@@ -9911,19 +9912,23 @@ svg {
} }
#carbonads .carbon-wrap { #carbonads .carbon-wrap {
min-height: 130px; min-height: 100px;
position: relative; position: relative;
} }
#carbonads .carbon-wrap:hover .carbon-img {
opacity: 0.9;
}
#carbonads .carbon-img { #carbonads .carbon-img {
bottom: 0; bottom: 0;
float: left; float: left;
left: 0; left: 0;
min-height: 130px; min-height: 100px;
padding: 15px 0 15px 15px; padding: 0;
position: absolute; position: absolute;
top: 0; top: 0;
width: 145px; width: calc(130px + 1rem);
} }
#carbonads .carbon-img img { #carbonads .carbon-img img {
@@ -9932,32 +9937,38 @@ svg {
width: 130px; width: 130px;
} }
#carbonads .carbon-img:hover { #carbonads .carbon-img:hover + .carbon-text {
opacity: 0.9; color: #3273dc;
} }
#carbonads .carbon-img:active { #carbonads .carbon-img:active {
opacity: 0.8; opacity: 0.8;
} }
#carbonads a:hover {
text-decoration: underline;
}
#carbonads .carbon-text { #carbonads .carbon-text {
display: block; display: block;
color: #363636; color: #363636;
line-height: 20px; line-height: 20px;
padding: 15px 15px 35px 160px; min-height: 100px;
padding: 0 0 20px calc(130px + 1rem);
}
#carbonads .carbon-text:hover {
color: #3273dc;
} }
#carbonads .carbon-poweredby { #carbonads .carbon-poweredby {
bottom: 10px; bottom: 0;
color: #7a7a7a; color: #7a7a7a;
display: inline; display: inline;
font-size: 0.75rem; font-size: 0.75rem;
line-height: 20px;
position: absolute; position: absolute;
right: 10px; right: 0;
}
#carbonads .carbon-poweredby:hover {
text-decoration: underline;
} }
.intro-content { .intro-content {

View File

@@ -0,0 +1,9 @@
---
title: Form
subtitle: "All <strong>form controls</strong>"
layout: documentation
breadcrumb:
- home
- documentation
- form
---

View File

@@ -1,8 +1,18 @@
--- ---
title: Checkbox title: Checkbox
subtitle: "The 2-state <strong>checkbox</strong> in its native format"
layout: documentation layout: documentation
doc-tab: form doc-tab: form
doc-subtab: checkbox doc-subtab: checkbox
breadcrumb:
- home
- documentation
- form
- form-checkbox
meta:
colors: false
sizes: false
variables: false
--- ---
{% capture checkbox_example %} {% capture checkbox_example %}
@@ -26,23 +36,6 @@ doc-subtab: checkbox
</label> </label>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Checkbox</h1>
<h2 class="subtitle">
The 2-state <strong>checkbox</strong> in its native format
</h2>
{%
include meta.html
colors=false
sizes=false
variables=false
%}
<hr>
<div class="content"> <div class="content">
<p> <p>
The <code>checkbox</code> class is a simple wrapper around the <code>&lt;input type="checkbox"&gt;</code> HTML element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience. The <code>checkbox</code> class is a simple wrapper around the <code>&lt;input type="checkbox"&gt;</code> HTML element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
@@ -81,5 +74,3 @@ doc-subtab: checkbox
{% highlight html %}{{checkbox_disabled_example}}{% endhighlight %} {% highlight html %}{{checkbox_disabled_example}}{% endhighlight %}
</div> </div>
</div> </div>
</div>
</section>

View File

@@ -1,8 +1,14 @@
--- ---
title: File upload title: File upload
subtitle: "A custom <strong>file upload</strong> input, without JavaScript"
layout: documentation layout: documentation
doc-tab: form doc-tab: form
doc-subtab: file doc-subtab: file
breadcrumb:
- home
- documentation
- form
- form-file
file_name: "Screen Shot 2017-07-29 at 15.54.25.png" file_name: "Screen Shot 2017-07-29 at 15.54.25.png"
variables_keys: variables_keys:
- file-border-color - file-border-color
@@ -15,6 +21,11 @@ variables_keys:
- file-name-border-style - file-name-border-style
- file-name-border-width - file-name-border-width
- file-name-max-width - file-name-max-width
meta:
experimental: true
colors: true
sizes: true
variables: true
--- ---
{% capture file %} {% capture file %}
@@ -527,25 +538,6 @@ variables_keys:
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">File upload</h1>
<h2 class="subtitle">
A custom <strong>file upload</strong> input, without JavaScript
</h2>
{%
include meta.html
experimental=true
since="0.5.1"
colors=true
sizes=true
variables=true
%}
<hr>
<div class="content"> <div class="content">
<p> <p>
The <code>.file</code> element is a simple <strong>interactive label</strong> that wraps an <code>&lt;input type="file"&gt;</code>. It comprises several sub-elements: The <code>.file</code> element is a simple <strong>interactive label</strong> that wraps an <code>&lt;input type="file"&gt;</code>. It comprises several sub-elements:
@@ -774,6 +766,3 @@ variables_keys:
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
</section>

View File

@@ -1,8 +1,14 @@
--- ---
title: Form controls title: Form controls
subtitle: "All generic <strong>form controls</strong>, designed for consistency"
layout: documentation layout: documentation
doc-tab: form doc-tab: form
doc-subtab: general doc-subtab: general
breadcrumb:
- home
- documentation
- form
- form-general
variables_controls_keys: variables_controls_keys:
- control-radius - control-radius
- control-radius-small - control-radius-small
@@ -795,17 +801,6 @@ variables_form_keys:
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Form controls</h1>
<h2 class="subtitle">
All generic <strong>form controls</strong>, designed for consistency
</h2>
<hr>
<div class="content"> <div class="content">
<p>The following form controls <strong>classes</strong> are supported:</p> <p>The following form controls <strong>classes</strong> are supported:</p>
<ul> <ul>
@@ -1081,6 +1076,3 @@ variables_form_keys:
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
</section>

View File

@@ -1,8 +1,14 @@
--- ---
title: Input title: Input
subtitle: "The <strong>text input</strong> and its variations"
layout: documentation layout: documentation
doc-tab: form doc-tab: form
doc-subtab: input doc-subtab: input
breadcrumb:
- home
- documentation
- form
- form-input
variables_keys: variables_keys:
- input-color - input-color
- input-background-color - input-background-color
@@ -21,6 +27,10 @@ variables_keys:
- input-icon-color - input-icon-color
- input-icon-active-color - input-icon-active-color
- input-radius - input-radius
meta:
colors: true
sizes: true
variables: true
--- ---
{% capture input_example %} {% capture input_example %}
@@ -239,23 +249,6 @@ variables_keys:
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Input</h1>
<h2 class="subtitle">
The <strong>text input</strong> and its variations
</h2>
{%
include meta.html
colors=true
sizes=true
variables=true
%}
<hr>
<div class="content"> <div class="content">
<p>The following <strong>modifiers</strong> are supported:</p> <p>The following <strong>modifiers</strong> are supported:</p>
<ul> <ul>
@@ -521,6 +514,3 @@ variables_keys:
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
</section>

View File

@@ -1,8 +1,18 @@
--- ---
title: Radio button title: Radio button
subtitle: "The mutually exclusive <strong>radio buttons</strong> in their native format"
layout: documentation layout: documentation
doc-tab: form doc-tab: form
doc-subtab: radio doc-subtab: radio
breadcrumb:
- home
- documentation
- form
- form-radio
meta:
colors: false
sizes: false
variables: false
--- ---
{% capture radio_example %} {% capture radio_example %}
@@ -48,23 +58,6 @@ doc-subtab: radio
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Radio</h1>
<h2 class="subtitle">
The mutually exclusive <strong>radio buttons</strong> in their native format
</h2>
{%
include meta.html
colors=false
sizes=false
variables=false
%}
<hr>
<div class="content"> <div class="content">
<p> <p>
The <code>radio</code> class is a simple wrapper around the <code>&lt;input type="radio"&gt;</code> HTML elements. It is intentionally not styled, to preserve cross-browser compatibility and the user experience. The <code>radio</code> class is a simple wrapper around the <code>&lt;input type="radio"&gt;</code> HTML elements. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
@@ -112,5 +105,3 @@ doc-subtab: radio
{% highlight html %}{{radio_disabled_example}}{% endhighlight %} {% highlight html %}{{radio_disabled_example}}{% endhighlight %}
</div> </div>
</div> </div>
</div>
</section>

View File

@@ -1,8 +1,18 @@
--- ---
title: Select title: Select
subtitle: "The browser built-in <strong>select dropdown</strong>, styled accordingly"
layout: documentation layout: documentation
doc-tab: form doc-tab: form
doc-subtab: select doc-subtab: select
breadcrumb:
- home
- documentation
- form
- form-select
meta:
colors: true
sizes: true
variables: false
--- ---
{% capture select_example %} {% capture select_example %}
@@ -270,23 +280,6 @@ doc-subtab: select
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Select</h1>
<h2 class="subtitle">
The browser built-in <strong>select dropdown</strong>, styled accordingly
</h2>
{%
include meta.html
colors=true
sizes=true
variables=false
%}
<hr>
<div class="content"> <div class="content">
<p>The following <strong>modifiers</strong> are supported:</p> <p>The following <strong>modifiers</strong> are supported:</p>
<ul> <ul>
@@ -469,6 +462,3 @@ doc-subtab: select
{% highlight html %}{{has_icons_large_example}}{% endhighlight %} {% highlight html %}{{has_icons_large_example}}{% endhighlight %}
</div> </div>
</div> </div>
</div>
</section>

View File

@@ -1,8 +1,18 @@
--- ---
title: Textarea title: Textarea
subtitle: "The multiline <strong>textarea</strong> and its variations"
layout: documentation layout: documentation
doc-tab: form doc-tab: form
doc-subtab: textarea doc-subtab: textarea
breadcrumb:
- home
- documentation
- form
- form-textarea
meta:
colors: true
sizes: true
variables: false
--- ---
{% capture textarea_example %} {% capture textarea_example %}
@@ -123,23 +133,6 @@ doc-subtab: textarea
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Textarea</h1>
<h2 class="subtitle">
The multiline <strong>textarea</strong> and its variations
</h2>
{%
include meta.html
colors=true
sizes=true
variables=false
%}
<hr>
{% include snippet.html content=textarea_example %} {% include snippet.html content=textarea_example %}
<div class="content"> <div class="content">
@@ -208,6 +201,3 @@ doc-subtab: textarea
</div> </div>
{% include snippet.html content=readonly_example %} {% include snippet.html content=readonly_example %}
</div>
</section>

View File

@@ -1,6 +1,8 @@
--- ---
title: Container title: Container
subtitle: "A simple <strong>container</strong> to center your content horizontally"
layout: documentation layout: documentation
hide_carbon: true
doc-tab: layout doc-tab: layout
doc-subtab: container doc-subtab: container
--- ---
@@ -38,17 +40,6 @@ doc-subtab: container
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav/subnav-layout.html %}
<section class="section">
<div class="container">
<h1 class="title">Container</h1>
<h2 class="subtitle">
A simple <strong>container</strong> to center your content horizontally
</h2>
<hr>
<div class="content"> <div class="content">
<p>The <code>.container</code> class can be used in any context, but mostly as a <strong>direct child</strong> of either:</p> <p>The <code>.container</code> class can be used in any context, but mostly as a <strong>direct child</strong> of either:</p>
<ul> <ul>
@@ -70,50 +61,56 @@ doc-subtab: container
</ul> </ul>
<p>The values <strong>960</strong>, <strong>1152</strong> and <strong>1344</strong> have been chosen because they are divisible by both <strong>12</strong> and <strong>16</strong>.</p> <p>The values <strong>960</strong>, <strong>1152</strong> and <strong>1344</strong> have been chosen because they are divisible by both <strong>12</strong> and <strong>16</strong>.</p>
</div> </div>
</div>
</section> {% include layout/main-close.html show_carbon=true %}
<div class="bd-example is-fullwidth"> <div class="bd-example is-fullwidth">
{{container_example}} {{container_example}}
</div> </div>
{% include layout/main-open.html %}
{% highlight html %}{{ container_example }}{% endhighlight %} {% highlight html %}{{ container_example }}{% endhighlight %}
<section class="section">
<div class="container">
<h3 class="title is-4">Fluid container</h3> <h3 class="title is-4">Fluid container</h3>
<div class="content"> <div class="content">
<p>If you don't want to have a maximum width but want to keep the 32px margin on the left and <p>If you don't want to have a maximum width but want to keep the 32px margin on the left and
right sides, add the <code>is-fluid</code> modifier:</p> right sides, add the <code>is-fluid</code> modifier:</p>
</div> </div>
</div>
</section> {% include layout/main-close.html %}
<div class="bd-example is-fullwidth"> <div class="bd-example is-fullwidth">
{{container_fluid_example}} {{container_fluid_example}}
</div> </div>
{% include layout/main-open.html %}
{% highlight html %}{{ container_fluid_example }}{% endhighlight %} {% highlight html %}{{ container_fluid_example }}{% endhighlight %}
<section class="section">
<div class="container">
<h3 class="title is-4">Breakpoint containers</h3> <h3 class="title is-4">Breakpoint containers</h3>
<div class="content"> <div class="content">
<p> <p>
With the two modifiers <code>.is-widescreen</code> and <code>.is-fullhd</code>, you can have a <em>fullwidth</em> container <strong>until</strong> those specific breakpoints. With the two modifiers <code>.is-widescreen</code> and <code>.is-fullhd</code>, you can have a <em>fullwidth</em> container <strong>until</strong> those specific breakpoints.
</p> </p>
</div> </div>
</div>
</section> {% include layout/main-close.html %}
<div class="bd-example is-fullwidth"> <div class="bd-example is-fullwidth">
{{container_widescreen_example}} {{container_widescreen_example}}
</div> </div>
{% include layout/main-open.html %}
{% highlight html %}{{ container_widescreen_example }}{% endhighlight %} {% highlight html %}{{ container_widescreen_example }}{% endhighlight %}
{% include layout/main-close.html %}
<div class="bd-example is-fullwidth"> <div class="bd-example is-fullwidth">
{{ container_fullhd_example }} {{ container_fullhd_example }}
</div> </div>
{% include layout/main-open.html %}
{% highlight html %}{{ container_fullhd_example }}{% endhighlight %} {% highlight html %}{{ container_fullhd_example }}{% endhighlight %}