Compare commits
13 commits
main
...
bulma-v1-c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c5312c4696 | ||
![]() |
3c7d60b802 | ||
![]() |
365672747b | ||
![]() |
a41ce795ae | ||
![]() |
b73e183091 | ||
![]() |
89a8b8f208 | ||
![]() |
8508af010a | ||
![]() |
a03da2b801 | ||
![]() |
f8ef28e788 | ||
![]() |
f86b4bf744 | ||
![]() |
7de49012b7 | ||
![]() |
f75e9fcec2 | ||
![]() |
dafc032ff0 |
162 changed files with 30350 additions and 12575 deletions
46
.github/CONTRIBUTING.md
vendored
46
.github/CONTRIBUTING.md
vendored
|
@ -2,20 +2,20 @@ Thanks for helping out! 😇
|
|||
|
||||
### Raising an issue
|
||||
|
||||
* Make sure the issue hasn't been raised yet
|
||||
* Include **screenshots** and animated GIFs in your issue whenever possible
|
||||
- Make sure the issue hasn't been raised yet
|
||||
- Include **screenshots** and animated GIFs in your issue whenever possible
|
||||
|
||||
### Submitting a Pull Request
|
||||
|
||||
* Include **screenshots** and animated GIFs in your pull request whenever possible
|
||||
* Use the **present** tense ("Add feature" not "Added feature")
|
||||
* Use the **imperative** mood ("Move cursor to..." not "Moves cursor to...")
|
||||
* Limit the first line to 72 characters or fewer
|
||||
* Reference issues and pull requests liberally
|
||||
- Include **screenshots** and animated GIFs in your pull request whenever possible
|
||||
- Use the **present** tense ("Add feature" not "Added feature")
|
||||
- Use the **imperative** mood ("Move cursor to..." not "Moves cursor to...")
|
||||
- Limit the first line to 72 characters or fewer
|
||||
- Reference issues and pull requests liberally
|
||||
|
||||
### Try your changes
|
||||
|
||||
When modifying any `.sass`, you will need to rebuild the css. You can do this by running:
|
||||
When modifying any `.scss`, you will need to rebuild the css. You can do this by running:
|
||||
|
||||
```
|
||||
npm install
|
||||
|
@ -26,21 +26,21 @@ To see documentation changes check [the documentation readme](../docs/README.md)
|
|||
|
||||
### Bulma Sass styleguide
|
||||
|
||||
* **No semi-colons** `;` or **curly braces** `{` `}`
|
||||
* **No camelCase**
|
||||
* Use only **classes**
|
||||
* Order the CSS properties **alphabetically**
|
||||
* Order the CSS rule by
|
||||
* direct styles
|
||||
* nested tags
|
||||
* pseudo-classes
|
||||
* color modifiers
|
||||
* size modifiers
|
||||
* modifiers
|
||||
* responsive styles
|
||||
* Add appropriate one-line comments for each of these sections within a CSS rule
|
||||
* **No trailing space**
|
||||
* End files with a **newline**
|
||||
- **No semi-colons** `;` or **curly braces** `{` `}`
|
||||
- **No camelCase**
|
||||
- Use only **classes**
|
||||
- Order the CSS properties **alphabetically**
|
||||
- Order the CSS rule by
|
||||
- direct styles
|
||||
- nested tags
|
||||
- pseudo-classes
|
||||
- color modifiers
|
||||
- size modifiers
|
||||
- modifiers
|
||||
- responsive styles
|
||||
- Add appropriate one-line comments for each of these sections within a CSS rule
|
||||
- **No trailing space**
|
||||
- End files with a **newline**
|
||||
|
||||
```sass
|
||||
.element
|
||||
|
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -2,7 +2,9 @@
|
|||
<!-- DO NOT REBUILD THE CSS OUTPUT IN YOUR PR -->
|
||||
|
||||
<!-- Choose one of the following: -->
|
||||
|
||||
This is a **new feature | improvement | bugfix | documentation fix**.
|
||||
|
||||
<!-- New feature? Update the CHANGELOG.md too, and eventually the Docs. -->
|
||||
<!-- Improvement? Explain how and why. -->
|
||||
<!-- Bugfix? Reference that issue as well. -->
|
||||
|
@ -24,7 +26,7 @@ None.
|
|||
<!-- BEFORE SUBMITTING YOUR PR, MAKE SURE TO FOLLOW THESE STEPS: -->
|
||||
<!-- 1. Pull the latest `master` branch -->
|
||||
<!-- 2. Make sure your Sass code is compliant with the [Bulma Sass styleguide](https://github.com/jgthms/bulma/blob/master/.github/CONTRIBUTING.md#bulma-sass-styleguide) -->
|
||||
<!-- 3. Make sure your PR only affects `.sass` or documentation files -->
|
||||
<!-- 3. Make sure your PR only affects `.scss` or documentation files -->
|
||||
<!-- 4. [Try your changes](https://github.com/jgthms/bulma/blob/master/.github/CONTRIBUTING.md#try-your-changes). -->
|
||||
|
||||
<!-- How have you confirmed this feature works? -->
|
||||
|
|
36
.github/workflows/main.yml
vendored
36
.github/workflows/main.yml
vendored
|
@ -1,11 +1,30 @@
|
|||
name: End-to-end tests
|
||||
on: [push]
|
||||
jobs:
|
||||
cypress-run:
|
||||
runs-on: ubuntu-20.04
|
||||
# sass-build:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: ruby/setup-ruby@v1
|
||||
# - name: Install ruby dependencies
|
||||
# run: gem install sass
|
||||
# - name: Ruby sass run
|
||||
# run: test/ruby-sass/ruby-sass.sh
|
||||
# - uses: actions/setup-node@v3
|
||||
# - name: Install dart-sass dependencies
|
||||
# run: npm install sass
|
||||
# - name: Build sass with dart-sass
|
||||
# run: node test/dart-sass/dart-sass.js
|
||||
# - name: Install node-sass dependencies
|
||||
# run: npm install node-sass
|
||||
# - name: Build sass with node-sass
|
||||
# run: node test/node-sass/node-sass.js
|
||||
sass-and-cypress-runs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.7
|
||||
|
@ -13,9 +32,16 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gem install jekyll bundler
|
||||
gem install sass jekyll bundler
|
||||
npm install sass node-sass
|
||||
- name: Ruby sass run
|
||||
run: test/ruby-sass/ruby-sass.sh
|
||||
- name: Dart sass run
|
||||
run: node test/dart-sass/dart-sass.js
|
||||
- name: Node sass run
|
||||
run: node test/node-sass/node-sass.js
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@v2
|
||||
uses: cypress-io/github-action@v4
|
||||
with:
|
||||
working-directory: docs
|
||||
install-command: npm install
|
||||
|
|
12
bower.json
12
bower.json
|
@ -4,8 +4,16 @@
|
|||
"homepage": "https://bulma.io",
|
||||
"authors": ["jgthms <bbxdesign@gmail.com>"],
|
||||
"description": "Modern CSS framework based on Flexbox",
|
||||
"main": "bulma.sass",
|
||||
"keywords": ["css", "sass", "flexbox", "responsive", "framework"],
|
||||
"main": "bulma.scss",
|
||||
"keywords": [
|
||||
"css",
|
||||
"sass",
|
||||
"scss",
|
||||
"modern",
|
||||
"flexbox",
|
||||
"responsive",
|
||||
"framework"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
|
|
5
bulma-prefixed.scss
Normal file
5
bulma-prefixed.scss
Normal file
|
@ -0,0 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
$class-prefix: "bulma-";
|
||||
|
||||
@import "bulma";
|
|
@ -1,3 +0,0 @@
|
|||
@charset "utf-8"
|
||||
$rtl: true
|
||||
@import "bulma"
|
5
bulma-rtl.scss
Normal file
5
bulma-rtl.scss
Normal file
|
@ -0,0 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
$rtl: true;
|
||||
|
||||
@import "bulma";
|
10
bulma.sass
vendored
10
bulma.sass
vendored
|
@ -1,10 +0,0 @@
|
|||
@charset "utf-8"
|
||||
/*! bulma.io v0.9.4 | MIT License | github.com/jgthms/bulma */
|
||||
@import "sass/utilities/_all"
|
||||
@import "sass/base/_all"
|
||||
@import "sass/elements/_all"
|
||||
@import "sass/form/_all"
|
||||
@import "sass/components/_all"
|
||||
@import "sass/grid/_all"
|
||||
@import "sass/helpers/_all"
|
||||
@import "sass/layout/_all"
|
12
bulma.scss
vendored
Normal file
12
bulma.scss
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
@charset "utf-8";
|
||||
|
||||
/*! bulma.io v0.9.4 | MIT License | github.com/jgthms/bulma */
|
||||
@import "sass/utilities/_all";
|
||||
@import "sass/base/_all";
|
||||
@import "sass/elements/_all";
|
||||
@import "sass/form/_all";
|
||||
@import "sass/components/_all";
|
||||
@import "sass/grid/_all";
|
||||
@import "sass/helpers/_all";
|
||||
@import "sass/layout/_all";
|
||||
@import "sass/themes/default";
|
11826
css/bulma-prefixed.css
Normal file
11826
css/bulma-prefixed.css
Normal file
File diff suppressed because it is too large
Load diff
1
css/bulma-prefixed.css.map
Normal file
1
css/bulma-prefixed.css.map
Normal file
File diff suppressed because one or more lines are too long
1
css/bulma-prefixed.min.css
vendored
Normal file
1
css/bulma-prefixed.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4855
css/bulma-rtl.css
4855
css/bulma-rtl.css
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
2
css/bulma-rtl.min.css
vendored
2
css/bulma-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
4855
css/bulma.css
vendored
4855
css/bulma.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
2
css/bulma.min.css
vendored
2
css/bulma.min.css
vendored
File diff suppressed because one or more lines are too long
9
docs/.gitignore
vendored
9
docs/.gitignore
vendored
|
@ -6,26 +6,27 @@ _config.local.yml
|
|||
_config.version.yml
|
||||
_layouts/basic.html
|
||||
_layouts/dev.html
|
||||
bulma-test.css
|
||||
bulma-test.sass
|
||||
bulma-test.scss
|
||||
bulma-test.css
|
||||
bulma-website-local.sass
|
||||
css/bulma-test.css
|
||||
css/bulma-docs.css.map
|
||||
PUBLISHING.md
|
||||
css/bulma-test.css
|
||||
npm-debug.log
|
||||
PUBLISHING.md
|
||||
test.html
|
||||
test.sass
|
||||
test.scss
|
||||
|
||||
# Folders
|
||||
|
||||
.jekyll-cache
|
||||
.sass-cache
|
||||
/bulma
|
||||
/cypress/videos
|
||||
/dev
|
||||
/icons
|
||||
/styles/node_modules
|
||||
/test
|
||||
/versions
|
||||
_site
|
||||
.jekyll-cache
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en" class="theme-dark">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>{% if page.fulltitle %}{{ page.fulltitle | markdownify | strip_html }}{% else %}{% if page.title %}{{ page.title | markdownify | strip_html }} | {% endif %}{{ site.data.meta.title | markdownify | strip_html }}{% endif %}</title>
|
||||
<title>
|
||||
{% if page.fulltitle %}{{ page.fulltitle | markdownify | strip_html }}{%
|
||||
else %}{% if page.title %}{{ page.title | markdownify | strip_html }} | {%
|
||||
endif %}{{ site.data.meta.title | markdownify | strip_html }}{% endif %}
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ site.url }}/vendor/fontawesome-free-5.15.2-web/css/all.min.css">
|
||||
<link rel="stylesheet" href="{{ site.url }}/css/bulma.css?v={{ site.time | date: "%Y%m%d%H%M" }}">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{ site.url }}/vendor/fontawesome-free-5.15.2-web/css/all.min.css"
|
||||
/>
|
||||
<link rel="stylesheet" href="{{ site.url }}/css/bulma.css?v={{ site.time |
|
||||
date: "%Y%m%d%H%M" }}">
|
||||
</head>
|
||||
<body>
|
||||
{{ content }}
|
||||
|
|
1
docs/bulma.scss
vendored
1
docs/bulma.scss
vendored
|
@ -1,2 +1,3 @@
|
|||
@charset "utf-8";
|
||||
@import "../bulma";
|
||||
@import "../sass/themes/dark";
|
||||
|
|
File diff suppressed because it is too large
Load diff
2
docs/css/bulma-docs.min.css
vendored
2
docs/css/bulma-docs.min.css
vendored
File diff suppressed because one or more lines are too long
4127
docs/css/bulma.css
vendored
4127
docs/css/bulma.css
vendored
File diff suppressed because it is too large
Load diff
|
@ -10,24 +10,38 @@ title: Base/Generic
|
|||
<header>header</header>
|
||||
<hgroup>hgroup</hgroup>
|
||||
<section>section</section>
|
||||
<body>body</body>
|
||||
<body>
|
||||
body
|
||||
</body>
|
||||
<button>button</button>
|
||||
<input>input</button>
|
||||
<input />
|
||||
<optgroup>optgroup</optgroup>
|
||||
<select>select</select>
|
||||
<select>
|
||||
select
|
||||
</select>
|
||||
<textarea>textarea</textarea>
|
||||
<code>code</code>
|
||||
<pre>pre<code>code</code></pre>
|
||||
<img src="{{ site.url }}/images/bulma-logo.png" alt="Bulma: a modern CSS framework based on Flexbox" width="112" height="28">
|
||||
<a>Link <strong>strong</strong></a>>
|
||||
<hr>hr</pre>
|
||||
<img>img</pre>
|
||||
<img
|
||||
src="{{ site.url }}/images/bulma-logo.png"
|
||||
alt="Bulma: a modern CSS framework based on Flexbox"
|
||||
width="112"
|
||||
height="28"
|
||||
/>
|
||||
<a>Link <strong>strong</strong></a>
|
||||
<hr />
|
||||
<img />
|
||||
<small>small</small>
|
||||
<span>span</span>
|
||||
<strong>strong</strong>
|
||||
<fieldset>fieldset</fieldset>
|
||||
<table><tr><th>th</th><td>td</td></tr></table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>th</th>
|
||||
<td>td</td>
|
||||
</tr>
|
||||
</table>
|
||||
<fieldset>
|
||||
<input type="checkbox" name="check">
|
||||
<input type="radio" name="rad">
|
||||
<input type="checkbox" name="check" />
|
||||
<input type="radio" name="rad" />
|
||||
</fieldset>
|
||||
|
|
|
@ -8,8 +8,41 @@ title: Elements/Progress
|
|||
</div>
|
||||
|
||||
<div class="block">
|
||||
<progress id="progress-small" class="progress is-small" value="15" max="100">15%</progress>
|
||||
<progress id="progress-normal" class="progress" value="15" max="100">30%</progress>
|
||||
<progress id="progress-medium" class="progress is-medium" value="15" max="100">45%</progress>
|
||||
<progress id="progress-large" class="progress is-large" value="15" max="100">60%</progress>
|
||||
<progress id="progress-small" class="progress is-small" value="15" max="100">
|
||||
15%
|
||||
</progress>
|
||||
<progress id="progress-normal" class="progress" value="15" max="100">
|
||||
30%
|
||||
</progress>
|
||||
<progress
|
||||
id="progress-medium"
|
||||
class="progress is-medium"
|
||||
value="15"
|
||||
max="100"
|
||||
>
|
||||
45%
|
||||
</progress>
|
||||
<progress id="progress-large" class="progress is-large" value="15" max="100">
|
||||
60%
|
||||
</progress>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
{% for color in site.data.colors.justColors %}
|
||||
<progress
|
||||
id="progress-{{ color }}"
|
||||
class="progress is-{{ color }}"
|
||||
value="15"
|
||||
max="100"
|
||||
>
|
||||
15%
|
||||
</progress>
|
||||
<progress
|
||||
id="progress-{{ color }}-indeterminate"
|
||||
class="progress is-{{ color }}"
|
||||
max="100"
|
||||
>
|
||||
15%
|
||||
</progress>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -1,83 +1,83 @@
|
|||
const { defineConfig } = require('cypress')
|
||||
const { defineConfig } = require("cypress");
|
||||
|
||||
module.exports = defineConfig({
|
||||
projectId: 'tnstsp',
|
||||
projectId: "bulma-e2e",
|
||||
env: {
|
||||
black: 'rgb(10, 10, 10)',
|
||||
'black-bis': 'rgb(18, 18, 18)',
|
||||
'black-ter': 'rgb(36, 36, 36)',
|
||||
'grey-darker': 'rgb(54, 54, 54)',
|
||||
'grey-dark': 'rgb(74, 74, 74)',
|
||||
grey: 'rgb(122, 122, 122)',
|
||||
'grey-light': 'rgb(181, 181, 181)',
|
||||
'grey-lighter': 'rgb(219, 219, 219)',
|
||||
'grey-lightest': 'rgb(237, 237, 237)',
|
||||
'white-ter': 'rgb(245, 245, 245)',
|
||||
'white-bis': 'rgb(250, 250, 250)',
|
||||
white: 'rgb(255, 255, 255)',
|
||||
transparent: 'rgba(0, 0, 0, 0)',
|
||||
'black-transparent': 'rgba(0, 0, 0, 0.7)',
|
||||
orange: 'rgb(255, 71, 15)',
|
||||
yellow: 'rgb(255, 224, 138)',
|
||||
green: 'rgb(72, 199, 142)',
|
||||
turquoise: 'rgb(0, 209, 178)',
|
||||
cyan: 'rgb(62, 142, 208)',
|
||||
blue: 'rgb(72, 95, 199)',
|
||||
purple: 'rgb(184, 107, 255)',
|
||||
red: 'rgb(241, 70, 104)',
|
||||
'color-names': ['primary', 'link', 'info', 'success', 'warning', 'danger'],
|
||||
primary: 'rgb(0, 209, 178)',
|
||||
'primary-invert': 'rgb(255, 255, 255)',
|
||||
'primary-light': 'rgb(235, 255, 252)',
|
||||
'primary-dark': 'rgb(0, 148, 126)',
|
||||
link: 'rgb(72, 95, 199)',
|
||||
'link-invert': 'rgb(255, 255, 255)',
|
||||
'link-light': 'rgb(239, 241, 250)',
|
||||
'link-dark': 'rgb(56, 80, 183)',
|
||||
info: 'rgb(62, 142, 208)',
|
||||
'info-invert': 'rgb(255, 255, 255)',
|
||||
'info-light': 'rgb(239, 245, 251)',
|
||||
'info-dark': 'rgb(41, 111, 168)',
|
||||
success: 'rgb(72, 199, 142)',
|
||||
'success-invert': 'rgb(255, 255, 255)',
|
||||
'success-light': 'rgb(239, 250, 245)',
|
||||
'success-dark': 'rgb(37, 121, 83)',
|
||||
warning: 'rgb(255, 224, 138)',
|
||||
'warning-invert': 'rgba(0, 0, 0, 0.7)',
|
||||
'warning-light': 'rgb(255, 250, 235)',
|
||||
'warning-dark': 'rgb(148, 108, 0)',
|
||||
danger: 'rgb(241, 70, 104)',
|
||||
'danger-invert': 'rgb(255, 255, 255)',
|
||||
'danger-light': 'rgb(254, 236, 240)',
|
||||
'danger-dark': 'rgb(204, 15, 53)',
|
||||
'scheme-main': 'rgb(255, 255, 255)',
|
||||
'scheme-main-bis': 'rgb(250, 250, 250)',
|
||||
'scheme-main-ter': 'rgb(245, 245, 245)',
|
||||
border: 'rgb(219, 219, 219)',
|
||||
'border-hover': 'rgb(181, 181, 181)',
|
||||
text: 'rgb(74, 74, 74)',
|
||||
'text-strong': 'rgb(54, 54, 54)',
|
||||
'text-light': 'rgb(122, 122, 122)',
|
||||
'text-invert': 'rgb(255, 255, 255)',
|
||||
code: 'rgb(218, 16, 57)',
|
||||
'control-radius': '4px',
|
||||
'control-radius-small': '2px',
|
||||
'control-border-width': '1px',
|
||||
'control-height': '40px',
|
||||
'control-line-height': '24px',
|
||||
'control-padding-vertical': '7px',
|
||||
'control-padding-horizontal': '11px',
|
||||
'input-shadow': 'rgba(10, 10, 10, 0.05) 0px 1px 2px 0px inset',
|
||||
'size-small': '12px',
|
||||
'size-normal': '16px',
|
||||
'size-medium': '20px',
|
||||
'size-large': '24px',
|
||||
'weight-light': '300',
|
||||
'weight-normal': '400',
|
||||
'weight-medium': '500',
|
||||
'weight-semibold': '600',
|
||||
'weight-bold': '700',
|
||||
'family-code': 'monospace',
|
||||
black: "rgb(10, 10, 10)",
|
||||
"black-bis": "rgb(18, 18, 18)",
|
||||
"black-ter": "rgb(36, 36, 36)",
|
||||
"grey-darker": "rgb(54, 54, 54)",
|
||||
"grey-dark": "rgb(74, 74, 74)",
|
||||
grey: "rgb(122, 122, 122)",
|
||||
"grey-light": "rgb(181, 181, 181)",
|
||||
"grey-lighter": "rgb(219, 219, 219)",
|
||||
"grey-lightest": "rgb(237, 237, 237)",
|
||||
"white-ter": "rgb(245, 245, 245)",
|
||||
"white-bis": "rgb(250, 250, 250)",
|
||||
white: "rgb(255, 255, 255)",
|
||||
transparent: "rgba(0, 0, 0, 0)",
|
||||
"black-transparent": "rgba(0, 0, 0, 0.7)",
|
||||
orange: "rgb(255, 71, 15)",
|
||||
yellow: "rgb(255, 224, 138)",
|
||||
green: "rgb(72, 199, 142)",
|
||||
turquoise: "rgb(0, 209, 178)",
|
||||
cyan: "rgb(62, 142, 208)",
|
||||
blue: "rgb(72, 95, 199)",
|
||||
purple: "rgb(184, 107, 255)",
|
||||
red: "rgb(241, 70, 104)",
|
||||
"color-names": ["primary", "link", "info", "success", "warning", "danger"],
|
||||
primary: "rgb(0, 209, 178)",
|
||||
"primary-invert": "rgb(255, 255, 255)",
|
||||
"primary-light": "rgb(235, 255, 252)",
|
||||
"primary-dark": "rgb(0, 148, 126)",
|
||||
link: "rgb(72, 95, 199)",
|
||||
"link-invert": "rgb(255, 255, 255)",
|
||||
"link-light": "rgb(239, 241, 250)",
|
||||
"link-dark": "rgb(56, 80, 183)",
|
||||
info: "rgb(62, 142, 208)",
|
||||
"info-invert": "rgb(255, 255, 255)",
|
||||
"info-light": "rgb(239, 245, 251)",
|
||||
"info-dark": "rgb(41, 111, 168)",
|
||||
success: "rgb(72, 199, 142)",
|
||||
"success-invert": "rgb(255, 255, 255)",
|
||||
"success-light": "rgb(239, 250, 245)",
|
||||
"success-dark": "rgb(37, 121, 83)",
|
||||
warning: "rgb(255, 224, 138)",
|
||||
"warning-invert": "rgba(0, 0, 0, 0.7)",
|
||||
"warning-light": "rgb(255, 250, 235)",
|
||||
"warning-dark": "rgb(148, 108, 0)",
|
||||
danger: "rgb(241, 70, 104)",
|
||||
"danger-invert": "rgb(255, 255, 255)",
|
||||
"danger-light": "rgb(254, 236, 240)",
|
||||
"danger-dark": "rgb(204, 15, 53)",
|
||||
"scheme-main": "rgb(255, 255, 255)",
|
||||
"scheme-main-bis": "rgb(250, 250, 250)",
|
||||
"scheme-main-ter": "rgb(245, 245, 245)",
|
||||
border: "rgb(219, 219, 219)",
|
||||
"border-hover": "rgb(181, 181, 181)",
|
||||
text: "rgb(74, 74, 74)",
|
||||
"text-strong": "rgb(54, 54, 54)",
|
||||
"text-light": "rgb(122, 122, 122)",
|
||||
"text-invert": "rgb(255, 255, 255)",
|
||||
code: "rgb(218, 16, 57)",
|
||||
"control-radius": "4px",
|
||||
"control-radius-small": "2px",
|
||||
"control-border-width": "1px",
|
||||
"control-height": "40px",
|
||||
"control-line-height": "24px",
|
||||
"control-padding-vertical": "7px",
|
||||
"control-padding-horizontal": "11px",
|
||||
"input-shadow": "rgba(10, 10, 10, 0.05) 0px 1px 2px 0px inset",
|
||||
"size-small": "12px",
|
||||
"size-normal": "16px",
|
||||
"size-medium": "20px",
|
||||
"size-large": "24px",
|
||||
"weight-light": "300",
|
||||
"weight-normal": "400",
|
||||
"weight-medium": "500",
|
||||
"weight-semibold": "600",
|
||||
"weight-bold": "700",
|
||||
"family-code": "monospace",
|
||||
viewports: {
|
||||
mobile: [320, 480],
|
||||
tablet: [769, 640],
|
||||
|
@ -98,14 +98,15 @@ module.exports = defineConfig({
|
|||
medium: 20,
|
||||
large: 24,
|
||||
},
|
||||
'just-sizes': ['small', 'normal', 'medium', 'large'],
|
||||
"just-sizes": ["small", "normal", "medium", "large"],
|
||||
},
|
||||
e2e: {
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
return require('./cypress/plugins/index.js')(on, config)
|
||||
return require("./cypress/plugins/index.js")(on, config);
|
||||
},
|
||||
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
|
||||
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
|
||||
},
|
||||
})
|
||||
video: false,
|
||||
});
|
||||
|
|
17
package.json
17
package.json
|
@ -8,7 +8,7 @@
|
|||
"url": "https://jgthms.com"
|
||||
},
|
||||
"description": "Modern CSS framework based on Flexbox",
|
||||
"main": "bulma.sass",
|
||||
"main": "bulma.scss",
|
||||
"unpkg": "css/bulma.css",
|
||||
"style": "bulma/css/bulma.min.css",
|
||||
"repository": {
|
||||
|
@ -19,6 +19,8 @@
|
|||
"keywords": [
|
||||
"css",
|
||||
"sass",
|
||||
"scss",
|
||||
"modern",
|
||||
"flexbox",
|
||||
"responsive",
|
||||
"framework"
|
||||
|
@ -37,19 +39,24 @@
|
|||
"build": "npm run build-sass && npm run build-autoprefix && npm run build-cleancss",
|
||||
"build-autoprefix": "postcss --use autoprefixer --map false --output css/bulma.css css/bulma.css",
|
||||
"build-cleancss": "cleancss -o css/bulma.min.css css/bulma.css",
|
||||
"build-sass": "node-sass --output-style expanded --source-map true bulma.sass css/bulma.css",
|
||||
"build-sass": "node-sass --output-style expanded --source-map true bulma.scss css/bulma.css",
|
||||
"clean": "rimraf css",
|
||||
"prefixed": "npm run prefixed-sass && npm run prefixed-autoprefix && npm run prefixed-cleancss",
|
||||
"prefixed-sass": "node-sass --output-style expanded --source-map true bulma-prefixed.scss css/bulma-prefixed.css",
|
||||
"prefixed-autoprefix": "postcss --use autoprefixer --map false --output css/bulma-prefixed.css css/bulma-prefixed.css",
|
||||
"prefixed-cleancss": "cleancss -o css/bulma-prefixed.min.css css/bulma-prefixed.css",
|
||||
"rtl": "npm run rtl-sass && npm run rtl-autoprefix && npm run rtl-cleancss",
|
||||
"rtl-sass": "node-sass --output-style expanded --source-map true bulma-rtl.sass css/bulma-rtl.css",
|
||||
"rtl-sass": "node-sass --output-style expanded --source-map true bulma-rtl.scss css/bulma-rtl.css",
|
||||
"rtl-autoprefix": "postcss --use autoprefixer --map false --output css/bulma-rtl.css css/bulma-rtl.css",
|
||||
"rtl-cleancss": "cleancss -o css/bulma-rtl.min.css css/bulma-rtl.css",
|
||||
"deploy": "npm run clean && npm run build && npm run rtl",
|
||||
"deploy": "npm run clean && npm run build && npm run prefixed && npm run rtl",
|
||||
"start": "npm run build-sass -- --watch"
|
||||
},
|
||||
"files": [
|
||||
"css",
|
||||
"sass",
|
||||
"bulma.sass",
|
||||
"bulma.scss",
|
||||
"bulma-rtl.scss",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
]
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
/* Bulma Base */
|
||||
@charset "utf-8"
|
||||
|
||||
@import "minireset"
|
||||
@import "generic"
|
||||
@import "animations"
|
6
sass/base/_all.scss
Normal file
6
sass/base/_all.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
/* Bulma Base */
|
||||
@charset "utf-8";
|
||||
|
||||
@import "minireset";
|
||||
@import "generic";
|
||||
@import "animations";
|
|
@ -1,5 +0,0 @@
|
|||
@keyframes spinAround
|
||||
from
|
||||
transform: rotate(0deg)
|
||||
to
|
||||
transform: rotate(359deg)
|
9
sass/base/animations.scss
Normal file
9
sass/base/animations.scss
Normal file
|
@ -0,0 +1,9 @@
|
|||
@keyframes spinAround {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
|
@ -1,145 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$body-background-color: $scheme-main !default
|
||||
$body-size: 16px !default
|
||||
$body-min-width: 300px !default
|
||||
$body-rendering: optimizeLegibility !default
|
||||
$body-family: $family-primary !default
|
||||
$body-overflow-x: hidden !default
|
||||
$body-overflow-y: scroll !default
|
||||
|
||||
$body-color: $text !default
|
||||
$body-font-size: 1em !default
|
||||
$body-weight: $weight-normal !default
|
||||
$body-line-height: 1.5 !default
|
||||
|
||||
$code-family: $family-code !default
|
||||
$code-padding: 0.25em 0.5em 0.25em !default
|
||||
$code-weight: normal !default
|
||||
$code-size: 0.875em !default
|
||||
|
||||
$small-font-size: 0.875em !default
|
||||
|
||||
$hr-background-color: $background !default
|
||||
$hr-height: 2px !default
|
||||
$hr-margin: 1.5rem 0 !default
|
||||
|
||||
$strong-color: $text-strong !default
|
||||
$strong-weight: $weight-bold !default
|
||||
|
||||
$pre-font-size: 0.875em !default
|
||||
$pre-padding: 1.25rem 1.5rem !default
|
||||
$pre-code-font-size: 1em !default
|
||||
|
||||
html
|
||||
background-color: $body-background-color
|
||||
font-size: $body-size
|
||||
-moz-osx-font-smoothing: grayscale
|
||||
-webkit-font-smoothing: antialiased
|
||||
min-width: $body-min-width
|
||||
overflow-x: $body-overflow-x
|
||||
overflow-y: $body-overflow-y
|
||||
text-rendering: $body-rendering
|
||||
text-size-adjust: 100%
|
||||
|
||||
article,
|
||||
aside,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
section
|
||||
display: block
|
||||
|
||||
body,
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea
|
||||
font-family: $body-family
|
||||
|
||||
code,
|
||||
pre
|
||||
-moz-osx-font-smoothing: auto
|
||||
-webkit-font-smoothing: auto
|
||||
font-family: $code-family
|
||||
|
||||
body
|
||||
color: $body-color
|
||||
font-size: $body-font-size
|
||||
font-weight: $body-weight
|
||||
line-height: $body-line-height
|
||||
|
||||
// Inline
|
||||
|
||||
a
|
||||
color: $link
|
||||
cursor: pointer
|
||||
text-decoration: none
|
||||
strong
|
||||
color: currentColor
|
||||
&:hover
|
||||
color: $link-hover
|
||||
|
||||
code
|
||||
background-color: $code-background
|
||||
color: $code
|
||||
font-size: $code-size
|
||||
font-weight: $code-weight
|
||||
padding: $code-padding
|
||||
|
||||
hr
|
||||
background-color: $hr-background-color
|
||||
border: none
|
||||
display: block
|
||||
height: $hr-height
|
||||
margin: $hr-margin
|
||||
|
||||
img
|
||||
height: auto
|
||||
max-width: 100%
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"]
|
||||
vertical-align: baseline
|
||||
|
||||
small
|
||||
font-size: $small-font-size
|
||||
|
||||
span
|
||||
font-style: inherit
|
||||
font-weight: inherit
|
||||
|
||||
strong
|
||||
color: $strong-color
|
||||
font-weight: $strong-weight
|
||||
|
||||
// Block
|
||||
|
||||
fieldset
|
||||
border: none
|
||||
|
||||
pre
|
||||
+overflow-touch
|
||||
background-color: $pre-background
|
||||
color: $pre
|
||||
font-size: $pre-font-size
|
||||
overflow-x: auto
|
||||
padding: $pre-padding
|
||||
white-space: pre
|
||||
word-wrap: normal
|
||||
code
|
||||
background-color: transparent
|
||||
color: currentColor
|
||||
font-size: $pre-code-font-size
|
||||
padding: 0
|
||||
|
||||
table
|
||||
td,
|
||||
th
|
||||
vertical-align: top
|
||||
&:not([align])
|
||||
text-align: inherit
|
||||
th
|
||||
color: $text-strong
|
204
sass/base/generic.scss
Normal file
204
sass/base/generic.scss
Normal file
|
@ -0,0 +1,204 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$body-background-color: getVar("scheme-main") !default;
|
||||
$body-size: 16px !default;
|
||||
$body-min-width: 300px !default;
|
||||
$body-rendering: optimizeLegibility !default;
|
||||
$body-family: getVar("family-primary") !default;
|
||||
$body-overflow-x: hidden !default;
|
||||
$body-overflow-y: scroll !default;
|
||||
|
||||
$body-color: getVar("text") !default;
|
||||
$body-font-size: 1em !default;
|
||||
$body-weight: getVar("weight-normal") !default;
|
||||
$body-line-height: 1.5 !default;
|
||||
|
||||
$code-family: getVar("family-code") !default;
|
||||
$code-padding: 0.25em 0.5em 0.25em !default;
|
||||
$code-weight: normal !default;
|
||||
$code-size: 0.875em !default;
|
||||
|
||||
$small-font-size: 0.875em !default;
|
||||
|
||||
$hr-background-color: getVar("background") !default;
|
||||
$hr-height: 2px !default;
|
||||
$hr-margin: 1.5rem 0 !default;
|
||||
|
||||
$strong-color: getVar("text-strong") !default;
|
||||
$strong-weight: getVar("weight-bold") !default;
|
||||
|
||||
$pre-font-size: 0.875em !default;
|
||||
$pre-padding: 1.25rem 1.5rem !default;
|
||||
$pre-code-font-size: 1em !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
body-background-color: #{$body-background-color},
|
||||
body-size: #{$body-size},
|
||||
body-min-width: #{$body-min-width},
|
||||
body-rendering: #{$body-rendering},
|
||||
body-family: #{$body-family},
|
||||
body-overflow-x: #{$body-overflow-x},
|
||||
body-overflow-y: #{$body-overflow-y},
|
||||
body-color: #{$body-color},
|
||||
body-font-size: #{$body-font-size},
|
||||
body-weight: #{$body-weight},
|
||||
body-line-height: #{$body-line-height},
|
||||
code-family: #{$code-family},
|
||||
code-padding: #{$code-padding},
|
||||
code-weight: #{$code-weight},
|
||||
code-size: #{$code-size},
|
||||
small-font-size: #{$small-font-size},
|
||||
hr-background-color: #{$hr-background-color},
|
||||
hr-height: #{$hr-height},
|
||||
hr-margin: #{$hr-margin},
|
||||
strong-color: #{$strong-color},
|
||||
strong-weight: #{$strong-weight},
|
||||
pre-font-size: #{$pre-font-size},
|
||||
pre-padding: #{$pre-padding},
|
||||
pre-code-font-size: #{$pre-code-font-size},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: getVar("body-background-color");
|
||||
font-size: getVar("body-size");
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
min-width: getVar("body-min-width");
|
||||
overflow-x: getVar("body-overflow-x");
|
||||
overflow-y: getVar("body-overflow-y");
|
||||
text-rendering: getVar("body-rendering");
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body,
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: getVar("body-family");
|
||||
}
|
||||
|
||||
code,
|
||||
pre {
|
||||
-moz-osx-font-smoothing: auto;
|
||||
-webkit-font-smoothing: auto;
|
||||
font-family: getVar("code-family");
|
||||
}
|
||||
|
||||
body {
|
||||
color: getVar("body-color");
|
||||
font-size: getVar("body-font-size");
|
||||
font-weight: getVar("body-weight");
|
||||
line-height: getVar("body-line-height");
|
||||
}
|
||||
|
||||
// Inline
|
||||
|
||||
a {
|
||||
color: getVar("link");
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
|
||||
strong {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: getVar("link-hover");
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: getVar("code-background");
|
||||
color: getVar("code");
|
||||
font-size: getVar("code-size");
|
||||
font-weight: getVar("code-weight");
|
||||
padding: getVar("code-padding");
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: getVar("hr-background-color");
|
||||
border: none;
|
||||
display: block;
|
||||
height: getVar("hr-height");
|
||||
margin: getVar("hr-margin");
|
||||
}
|
||||
|
||||
img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: getVar("small-font-size");
|
||||
}
|
||||
|
||||
span {
|
||||
font-style: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: getVar("strong-color");
|
||||
font-weight: getVar("strong-weight");
|
||||
}
|
||||
|
||||
// Block
|
||||
|
||||
fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
pre {
|
||||
@include overflow-touch;
|
||||
|
||||
background-color: getVar("pre-background");
|
||||
color: getVar("pre");
|
||||
font-size: getVar("pre-font-size");
|
||||
overflow-x: auto;
|
||||
padding: getVar("pre-padding");
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
|
||||
code {
|
||||
background-color: transparent;
|
||||
color: currentColor;
|
||||
font-size: getVar("pre-code-font-size");
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
td,
|
||||
th {
|
||||
vertical-align: top;
|
||||
|
||||
&:not([align]) {
|
||||
text-align: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
th {
|
||||
color: getVar("text-strong");
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@warn "The helpers.sass file is DEPRECATED. It has moved into its own /helpers folder. Please import sass/helpers/_all instead."
|
|
@ -1,79 +0,0 @@
|
|||
/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */
|
||||
// Blocks
|
||||
html,
|
||||
body,
|
||||
p,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
blockquote,
|
||||
figure,
|
||||
fieldset,
|
||||
legend,
|
||||
textarea,
|
||||
pre,
|
||||
iframe,
|
||||
hr,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
// Headings
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6
|
||||
font-size: 100%
|
||||
font-weight: normal
|
||||
|
||||
// List
|
||||
ul
|
||||
list-style: none
|
||||
|
||||
// Form
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea
|
||||
margin: 0
|
||||
|
||||
// Box sizing
|
||||
html
|
||||
box-sizing: border-box
|
||||
|
||||
*
|
||||
&,
|
||||
&::before,
|
||||
&::after
|
||||
box-sizing: inherit
|
||||
|
||||
// Media
|
||||
img,
|
||||
video
|
||||
height: auto
|
||||
max-width: 100%
|
||||
|
||||
// Iframe
|
||||
iframe
|
||||
border: 0
|
||||
|
||||
// Table
|
||||
table
|
||||
border-collapse: collapse
|
||||
border-spacing: 0
|
||||
|
||||
td,
|
||||
th
|
||||
padding: 0
|
||||
&:not([align])
|
||||
text-align: inherit
|
92
sass/base/minireset.scss
Normal file
92
sass/base/minireset.scss
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */
|
||||
// Blocks
|
||||
html,
|
||||
body,
|
||||
p,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
blockquote,
|
||||
figure,
|
||||
fieldset,
|
||||
legend,
|
||||
textarea,
|
||||
pre,
|
||||
iframe,
|
||||
hr,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
// Headings
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: 100%;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
// List
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
// Form
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// Box sizing
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
* {
|
||||
&,
|
||||
&::before,
|
||||
&::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// Media
|
||||
img,
|
||||
video {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
// Iframe
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
// Table
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
|
||||
&:not([align]) {
|
||||
text-align: inherit;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
/* Bulma Components */
|
||||
@charset "utf-8"
|
||||
|
||||
@import "breadcrumb"
|
||||
@import "card"
|
||||
@import "dropdown"
|
||||
@import "level"
|
||||
@import "media"
|
||||
@import "menu"
|
||||
@import "message"
|
||||
@import "modal"
|
||||
@import "navbar"
|
||||
@import "pagination"
|
||||
@import "panel"
|
||||
@import "tabs"
|
15
sass/components/_all.scss
Normal file
15
sass/components/_all.scss
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* Bulma Components */
|
||||
@charset "utf-8";
|
||||
|
||||
@import "breadcrumb";
|
||||
@import "card";
|
||||
@import "dropdown";
|
||||
@import "level";
|
||||
@import "media";
|
||||
@import "menu";
|
||||
@import "message";
|
||||
@import "modal";
|
||||
@import "navbar";
|
||||
@import "pagination";
|
||||
@import "panel";
|
||||
@import "tabs";
|
|
@ -1,77 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$breadcrumb-item-color: $link !default
|
||||
$breadcrumb-item-hover-color: $link-hover !default
|
||||
$breadcrumb-item-active-color: $text-strong !default
|
||||
|
||||
$breadcrumb-item-padding-vertical: 0 !default
|
||||
$breadcrumb-item-padding-horizontal: 0.75em !default
|
||||
|
||||
$breadcrumb-item-separator-color: $border-hover !default
|
||||
|
||||
.breadcrumb
|
||||
@extend %block
|
||||
@extend %unselectable
|
||||
font-size: $size-normal
|
||||
white-space: nowrap
|
||||
a
|
||||
align-items: center
|
||||
color: $breadcrumb-item-color
|
||||
display: flex
|
||||
justify-content: center
|
||||
padding: $breadcrumb-item-padding-vertical $breadcrumb-item-padding-horizontal
|
||||
&:hover
|
||||
color: $breadcrumb-item-hover-color
|
||||
li
|
||||
align-items: center
|
||||
display: flex
|
||||
&:first-child a
|
||||
+ltr-property("padding", 0, false)
|
||||
&.is-active
|
||||
a
|
||||
color: $breadcrumb-item-active-color
|
||||
cursor: default
|
||||
pointer-events: none
|
||||
& + li::before
|
||||
color: $breadcrumb-item-separator-color
|
||||
content: "\0002f"
|
||||
ul,
|
||||
ol
|
||||
align-items: flex-start
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
justify-content: flex-start
|
||||
.icon
|
||||
&:first-child
|
||||
+ltr-property("margin", 0.5em)
|
||||
&:last-child
|
||||
+ltr-property("margin", 0.5em, false)
|
||||
// Alignment
|
||||
&.is-centered
|
||||
ol,
|
||||
ul
|
||||
justify-content: center
|
||||
&.is-right
|
||||
ol,
|
||||
ul
|
||||
justify-content: flex-end
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
&.is-large
|
||||
font-size: $size-large
|
||||
// Styles
|
||||
&.has-arrow-separator
|
||||
li + li::before
|
||||
content: "\02192"
|
||||
&.has-bullet-separator
|
||||
li + li::before
|
||||
content: "\02022"
|
||||
&.has-dot-separator
|
||||
li + li::before
|
||||
content: "\000b7"
|
||||
&.has-succeeds-separator
|
||||
li + li::before
|
||||
content: "\0227B"
|
137
sass/components/breadcrumb.scss
Normal file
137
sass/components/breadcrumb.scss
Normal file
|
@ -0,0 +1,137 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$breadcrumb-item-color: getVar("link") !default;
|
||||
$breadcrumb-item-hover-color: getVar("link-hover") !default;
|
||||
$breadcrumb-item-active-color: getVar("text-strong") !default;
|
||||
|
||||
$breadcrumb-item-padding-vertical: 0 !default;
|
||||
$breadcrumb-item-padding-horizontal: 0.75em !default;
|
||||
|
||||
$breadcrumb-item-separator-color: getVar("border-hover") !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
breadcrumb-item-color: #{$breadcrumb-item-color},
|
||||
breadcrumb-item-hover-color: #{$breadcrumb-item-hover-color},
|
||||
breadcrumb-item-active-color: #{$breadcrumb-item-active-color},
|
||||
breadcrumb-item-padding-vertical: #{$breadcrumb-item-padding-vertical},
|
||||
breadcrumb-item-padding-horizontal: #{$breadcrumb-item-padding-horizontal},
|
||||
breadcrumb-item-separator-color: #{$breadcrumb-item-separator-color},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}breadcrumb {
|
||||
@extend %block;
|
||||
@extend %unselectable;
|
||||
|
||||
font-size: getVar("size-normal");
|
||||
white-space: nowrap;
|
||||
|
||||
a {
|
||||
align-items: center;
|
||||
color: getVar("breadcrumb-item-color");
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: getVar("breadcrumb-item-padding-vertical")
|
||||
getVar("breadcrumb-item-padding-horizontal");
|
||||
|
||||
&:hover {
|
||||
color: getVar("breadcrumb-item-hover-color");
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
&:first-child a {
|
||||
@include ltr-property("padding", 0, false);
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
a {
|
||||
color: getVar("breadcrumb-item-active-color");
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
& + li::before {
|
||||
color: getVar("breadcrumb-item-separator-color");
|
||||
content: "/";
|
||||
}
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
align-items: flex-start;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.#{$class-prefix}icon {
|
||||
&:first-child {
|
||||
@include ltr-property("margin", 0.5em);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include ltr-property("margin", 0.5em, false);
|
||||
}
|
||||
}
|
||||
|
||||
// Alignment
|
||||
&.is-centered {
|
||||
ol,
|
||||
ul {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
ol,
|
||||
ul {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: getVar("size-large");
|
||||
}
|
||||
|
||||
// Styles
|
||||
&.has-arrow-separator {
|
||||
li + li::before {
|
||||
content: "→";
|
||||
}
|
||||
}
|
||||
|
||||
&.has-bullet-separator {
|
||||
li + li::before {
|
||||
content: "•";
|
||||
}
|
||||
}
|
||||
|
||||
&.has-dot-separator {
|
||||
li + li::before {
|
||||
content: "·";
|
||||
}
|
||||
}
|
||||
|
||||
&.has-succeeds-separator {
|
||||
li + li::before {
|
||||
content: "≻";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$card-color: $text !default
|
||||
$card-background-color: $scheme-main !default
|
||||
$card-shadow: $shadow !default
|
||||
$card-radius: 0.25rem !default
|
||||
|
||||
$card-header-background-color: transparent !default
|
||||
$card-header-color: $text-strong !default
|
||||
$card-header-padding: 0.75rem 1rem !default
|
||||
$card-header-shadow: 0 0.125em 0.25em rgba($scheme-invert, 0.1) !default
|
||||
$card-header-weight: $weight-bold !default
|
||||
|
||||
$card-content-background-color: transparent !default
|
||||
$card-content-padding: 1.5rem !default
|
||||
|
||||
$card-footer-background-color: transparent !default
|
||||
$card-footer-border-top: 1px solid $border-light !default
|
||||
$card-footer-padding: 0.75rem !default
|
||||
|
||||
$card-media-margin: $block-spacing !default
|
||||
|
||||
.card
|
||||
background-color: $card-background-color
|
||||
border-radius: $card-radius
|
||||
box-shadow: $card-shadow
|
||||
color: $card-color
|
||||
max-width: 100%
|
||||
position: relative
|
||||
|
||||
%card-item
|
||||
&:first-child
|
||||
border-top-left-radius: $card-radius
|
||||
border-top-right-radius: $card-radius
|
||||
&:last-child
|
||||
border-bottom-left-radius: $card-radius
|
||||
border-bottom-right-radius: $card-radius
|
||||
|
||||
.card-header
|
||||
@extend %card-item
|
||||
background-color: $card-header-background-color
|
||||
align-items: stretch
|
||||
box-shadow: $card-header-shadow
|
||||
display: flex
|
||||
|
||||
.card-header-title
|
||||
align-items: center
|
||||
color: $card-header-color
|
||||
display: flex
|
||||
flex-grow: 1
|
||||
font-weight: $card-header-weight
|
||||
padding: $card-header-padding
|
||||
&.is-centered
|
||||
justify-content: center
|
||||
|
||||
.card-header-icon
|
||||
+reset
|
||||
align-items: center
|
||||
cursor: pointer
|
||||
display: flex
|
||||
justify-content: center
|
||||
padding: $card-header-padding
|
||||
|
||||
.card-image
|
||||
display: block
|
||||
position: relative
|
||||
&:first-child
|
||||
img
|
||||
border-top-left-radius: $card-radius
|
||||
border-top-right-radius: $card-radius
|
||||
&:last-child
|
||||
img
|
||||
border-bottom-left-radius: $card-radius
|
||||
border-bottom-right-radius: $card-radius
|
||||
|
||||
.card-content
|
||||
@extend %card-item
|
||||
background-color: $card-content-background-color
|
||||
padding: $card-content-padding
|
||||
|
||||
.card-footer
|
||||
@extend %card-item
|
||||
background-color: $card-footer-background-color
|
||||
border-top: $card-footer-border-top
|
||||
align-items: stretch
|
||||
display: flex
|
||||
|
||||
.card-footer-item
|
||||
align-items: center
|
||||
display: flex
|
||||
flex-basis: 0
|
||||
flex-grow: 1
|
||||
flex-shrink: 0
|
||||
justify-content: center
|
||||
padding: $card-footer-padding
|
||||
&:not(:last-child)
|
||||
+ltr-property("border", $card-footer-border-top)
|
||||
|
||||
// Combinations
|
||||
|
||||
.card
|
||||
.media:not(:last-child)
|
||||
margin-bottom: $card-media-margin
|
153
sass/components/card.scss
Normal file
153
sass/components/card.scss
Normal file
|
@ -0,0 +1,153 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$card-color: getVar("text") !default;
|
||||
$card-background-color: getVar("scheme-main") !default;
|
||||
$card-shadow: getVar("shadow") !default;
|
||||
$card-radius: 0.25rem !default;
|
||||
|
||||
$card-header-background-color: transparent !default;
|
||||
$card-header-color: getVar("text-strong") !default;
|
||||
$card-header-padding: 0.75rem 1rem !default;
|
||||
$card-header-shadow: 0 0.125em 0.25em rgba(getVar("shadow-color-rgb"), 0.1) !default; // TODO
|
||||
$card-header-weight: getVar("weight-bold") !default;
|
||||
|
||||
$card-content-background-color: transparent !default;
|
||||
$card-content-padding: 1.5rem !default;
|
||||
|
||||
$card-footer-background-color: transparent !default;
|
||||
$card-footer-border-top: 1px solid getVar("border-light") !default;
|
||||
$card-footer-padding: 0.75rem !default;
|
||||
|
||||
$card-media-margin: getVar("block-spacing") !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
card-color: #{$card-color},
|
||||
card-background-color: #{$card-background-color},
|
||||
card-shadow: #{$card-shadow},
|
||||
card-radius: #{$card-radius},
|
||||
card-header-background-color: #{$card-header-background-color},
|
||||
card-header-color: #{$card-header-color},
|
||||
card-header-padding: #{$card-header-padding},
|
||||
card-header-shadow: #{$card-header-shadow},
|
||||
card-header-weight: #{$card-header-weight},
|
||||
card-content-background-color: #{$card-content-background-color},
|
||||
card-content-padding: #{$card-content-padding},
|
||||
card-footer-background-color: #{$card-footer-background-color},
|
||||
card-footer-border-top: #{$card-footer-border-top},
|
||||
card-footer-padding: #{$card-footer-padding},
|
||||
card-media-margin: #{$card-media-margin},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}card {
|
||||
background-color: getVar("card-background-color");
|
||||
border-radius: getVar("card-radius");
|
||||
box-shadow: getVar("card-shadow");
|
||||
color: getVar("card-color");
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
%card-item {
|
||||
&:first-child {
|
||||
border-top-left-radius: getVar("card-radius");
|
||||
border-top-right-radius: getVar("card-radius");
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-left-radius: getVar("card-radius");
|
||||
border-bottom-right-radius: getVar("card-radius");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}card-header {
|
||||
@extend %card-item;
|
||||
|
||||
background-color: getVar("card-header-background-color");
|
||||
align-items: stretch;
|
||||
box-shadow: getVar("card-header-shadow");
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.#{$class-prefix}card-header-title {
|
||||
align-items: center;
|
||||
color: getVar("card-header-color");
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
font-weight: getVar("card-header-weight");
|
||||
padding: getVar("card-header-padding");
|
||||
|
||||
&.is-centered {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}card-header-icon {
|
||||
@include reset;
|
||||
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: getVar("card-header-padding");
|
||||
}
|
||||
|
||||
.#{$class-prefix}card-image {
|
||||
display: block;
|
||||
position: relative;
|
||||
|
||||
&:first-child {
|
||||
img {
|
||||
border-top-left-radius: getVar("card-radius");
|
||||
border-top-right-radius: getVar("card-radius");
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
img {
|
||||
border-bottom-left-radius: getVar("card-radius");
|
||||
border-bottom-right-radius: getVar("card-radius");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}card-content {
|
||||
@extend %card-item;
|
||||
|
||||
background-color: getVar("card-content-background-color");
|
||||
padding: getVar("card-content-padding");
|
||||
}
|
||||
|
||||
.#{$class-prefix}card-footer {
|
||||
@extend %card-item;
|
||||
|
||||
background-color: getVar("card-footer-background-color");
|
||||
border-top: getVar("card-footer-border-top");
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.#{$class-prefix}card-footer-item {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
padding: getVar("card-footer-padding");
|
||||
|
||||
&:not(:last-child) {
|
||||
@include ltr-property("border", getVar("card-footer-border-top"));
|
||||
}
|
||||
}
|
||||
|
||||
// Combinations
|
||||
|
||||
.#{$class-prefix}card {
|
||||
.#{$class-prefix}media:not(:last-child) {
|
||||
margin-bottom: getVar("card-media-margin");
|
||||
}
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$dropdown-menu-min-width: 12rem !default
|
||||
|
||||
$dropdown-content-background-color: $scheme-main !default
|
||||
$dropdown-content-arrow: $link !default
|
||||
$dropdown-content-offset: 4px !default
|
||||
$dropdown-content-padding-bottom: 0.5rem !default
|
||||
$dropdown-content-padding-top: 0.5rem !default
|
||||
$dropdown-content-radius: $radius !default
|
||||
$dropdown-content-shadow: $shadow !default
|
||||
$dropdown-content-z: 20 !default
|
||||
|
||||
$dropdown-item-color: $text !default
|
||||
$dropdown-item-hover-color: $scheme-invert !default
|
||||
$dropdown-item-hover-background-color: $background !default
|
||||
$dropdown-item-active-color: $link-invert !default
|
||||
$dropdown-item-active-background-color: $link !default
|
||||
|
||||
$dropdown-divider-background-color: $border-light !default
|
||||
|
||||
.dropdown
|
||||
display: inline-flex
|
||||
position: relative
|
||||
vertical-align: top
|
||||
&.is-active,
|
||||
&.is-hoverable:hover
|
||||
.dropdown-menu
|
||||
display: block
|
||||
&.is-right
|
||||
.dropdown-menu
|
||||
left: auto
|
||||
right: 0
|
||||
&.is-up
|
||||
.dropdown-menu
|
||||
bottom: 100%
|
||||
padding-bottom: $dropdown-content-offset
|
||||
padding-top: initial
|
||||
top: auto
|
||||
|
||||
.dropdown-menu
|
||||
display: none
|
||||
+ltr-position(0, false)
|
||||
min-width: $dropdown-menu-min-width
|
||||
padding-top: $dropdown-content-offset
|
||||
position: absolute
|
||||
top: 100%
|
||||
z-index: $dropdown-content-z
|
||||
|
||||
.dropdown-content
|
||||
background-color: $dropdown-content-background-color
|
||||
border-radius: $dropdown-content-radius
|
||||
box-shadow: $dropdown-content-shadow
|
||||
padding-bottom: $dropdown-content-padding-bottom
|
||||
padding-top: $dropdown-content-padding-top
|
||||
|
||||
.dropdown-item
|
||||
color: $dropdown-item-color
|
||||
display: block
|
||||
font-size: 0.875rem
|
||||
line-height: 1.5
|
||||
padding: 0.375rem 1rem
|
||||
position: relative
|
||||
|
||||
a.dropdown-item,
|
||||
button.dropdown-item
|
||||
+ltr-property("padding", 3rem)
|
||||
text-align: inherit
|
||||
white-space: nowrap
|
||||
width: 100%
|
||||
&:hover
|
||||
background-color: $dropdown-item-hover-background-color
|
||||
color: $dropdown-item-hover-color
|
||||
&.is-active
|
||||
background-color: $dropdown-item-active-background-color
|
||||
color: $dropdown-item-active-color
|
||||
|
||||
.dropdown-divider
|
||||
background-color: $dropdown-divider-background-color
|
||||
border: none
|
||||
display: block
|
||||
height: 1px
|
||||
margin: 0.5rem 0
|
127
sass/components/dropdown.scss
Normal file
127
sass/components/dropdown.scss
Normal file
|
@ -0,0 +1,127 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$dropdown-menu-min-width: 12rem !default;
|
||||
|
||||
$dropdown-content-background-color: getVar("scheme-main") !default;
|
||||
$dropdown-content-arrow: getVar("link") !default;
|
||||
$dropdown-content-offset: 4px !default;
|
||||
$dropdown-content-padding-bottom: 0.5rem !default;
|
||||
$dropdown-content-padding-top: 0.5rem !default;
|
||||
$dropdown-content-radius: getVar("radius") !default;
|
||||
$dropdown-content-shadow: getVar("shadow") !default;
|
||||
$dropdown-content-z: 20 !default;
|
||||
|
||||
$dropdown-item-color: getVar("text") !default;
|
||||
$dropdown-item-hover-color: getVar("scheme-invert") !default;
|
||||
$dropdown-item-hover-background-color: getVar("background") !default;
|
||||
$dropdown-item-active-color: getVar("link-invert") !default;
|
||||
$dropdown-item-active-background-color: getVar("link") !default;
|
||||
|
||||
$dropdown-divider-background-color: getVar("border-light") !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
dropdown-menu-min-width: #{$dropdown-menu-min-width},
|
||||
dropdown-content-background-color: #{$dropdown-content-background-color},
|
||||
dropdown-content-arrow: #{$dropdown-content-arrow},
|
||||
dropdown-content-offset: #{$dropdown-content-offset},
|
||||
dropdown-content-padding-bottom: #{$dropdown-content-padding-bottom},
|
||||
dropdown-content-padding-top: #{$dropdown-content-padding-top},
|
||||
dropdown-content-radius: #{$dropdown-content-radius},
|
||||
dropdown-content-shadow: #{$dropdown-content-shadow},
|
||||
dropdown-content-z: #{$dropdown-content-z},
|
||||
dropdown-item-color: #{$dropdown-item-color},
|
||||
dropdown-item-hover-color: #{$dropdown-item-hover-color},
|
||||
dropdown-item-hover-background-color: #{$dropdown-item-hover-background-color},
|
||||
dropdown-item-active-color: #{$dropdown-item-active-color},
|
||||
dropdown-item-active-background-color: #{$dropdown-item-active-background-color},
|
||||
dropdown-divider-background-color: #{$dropdown-divider-background-color},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}dropdown {
|
||||
display: inline-flex;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
|
||||
&.is-active,
|
||||
&.is-hoverable:hover {
|
||||
.#{$class-prefix}dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
.#{$class-prefix}dropdown-menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-up {
|
||||
.#{$class-prefix}dropdown-menu {
|
||||
bottom: 100%;
|
||||
padding-bottom: getVar("dropdown-content-offset");
|
||||
padding-top: initial;
|
||||
top: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}dropdown-menu {
|
||||
display: none;
|
||||
|
||||
@include ltr-position(0, false);
|
||||
|
||||
min-width: getVar("dropdown-menu-min-width");
|
||||
padding-top: getVar("dropdown-content-offset");
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
z-index: getVar("dropdown-content-z");
|
||||
}
|
||||
|
||||
.#{$class-prefix}dropdown-content {
|
||||
background-color: getVar("dropdown-content-background-color");
|
||||
border-radius: getVar("dropdown-content-radius");
|
||||
box-shadow: getVar("dropdown-content-shadow");
|
||||
padding-bottom: getVar("dropdown-content-padding-bottom");
|
||||
padding-top: getVar("dropdown-content-padding-top");
|
||||
}
|
||||
|
||||
.#{$class-prefix}dropdown-item {
|
||||
color: getVar("dropdown-item-color");
|
||||
display: block;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
padding: 0.375rem 1rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
a.#{$class-prefix}dropdown-item,
|
||||
button.#{$class-prefix}dropdown-item {
|
||||
@include ltr-property("padding", 3rem);
|
||||
|
||||
text-align: inherit;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
background-color: getVar("dropdown-item-hover-background-color");
|
||||
color: getVar("dropdown-item-hover-color");
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background-color: getVar("dropdown-item-active-background-color");
|
||||
color: getVar("dropdown-item-active-color");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}dropdown-divider {
|
||||
background-color: getVar("dropdown-divider-background-color");
|
||||
border: none;
|
||||
display: block;
|
||||
height: 1px;
|
||||
margin: 0.5rem 0;
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$level-item-spacing: ($block-spacing * 0.5) !default
|
||||
|
||||
.level
|
||||
@extend %block
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
code
|
||||
border-radius: $radius
|
||||
img
|
||||
display: inline-block
|
||||
vertical-align: top
|
||||
// Modifiers
|
||||
&.is-mobile
|
||||
display: flex
|
||||
.level-left,
|
||||
.level-right
|
||||
display: flex
|
||||
.level-left + .level-right
|
||||
margin-top: 0
|
||||
.level-item
|
||||
&:not(:last-child)
|
||||
margin-bottom: 0
|
||||
+ltr-property("margin", $level-item-spacing)
|
||||
&:not(.is-narrow)
|
||||
flex-grow: 1
|
||||
// Responsiveness
|
||||
+tablet
|
||||
display: flex
|
||||
& > .level-item
|
||||
&:not(.is-narrow)
|
||||
flex-grow: 1
|
||||
|
||||
.level-item
|
||||
align-items: center
|
||||
display: flex
|
||||
flex-basis: auto
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
justify-content: center
|
||||
.title,
|
||||
.subtitle
|
||||
margin-bottom: 0
|
||||
// Responsiveness
|
||||
+mobile
|
||||
&:not(:last-child)
|
||||
margin-bottom: $level-item-spacing
|
||||
|
||||
.level-left,
|
||||
.level-right
|
||||
flex-basis: auto
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
.level-item
|
||||
// Modifiers
|
||||
&.is-flexible
|
||||
flex-grow: 1
|
||||
// Responsiveness
|
||||
+tablet
|
||||
&:not(:last-child)
|
||||
+ltr-property("margin", $level-item-spacing)
|
||||
|
||||
.level-left
|
||||
align-items: center
|
||||
justify-content: flex-start
|
||||
// Responsiveness
|
||||
+mobile
|
||||
& + .level-right
|
||||
margin-top: 1.5rem
|
||||
+tablet
|
||||
display: flex
|
||||
|
||||
.level-right
|
||||
align-items: center
|
||||
justify-content: flex-end
|
||||
// Responsiveness
|
||||
+tablet
|
||||
display: flex
|
122
sass/components/level.scss
Normal file
122
sass/components/level.scss
Normal file
|
@ -0,0 +1,122 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
.#{$class-prefix}level {
|
||||
@extend %block;
|
||||
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
code {
|
||||
border-radius: getVar("radius");
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.is-mobile {
|
||||
display: flex;
|
||||
|
||||
.#{$class-prefix}level-left,
|
||||
.#{$class-prefix}level-right {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.#{$class-prefix}level-left + .#{$class-prefix}level-right {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.#{$class-prefix}level-item {
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 0;
|
||||
|
||||
@include ltr-property("margin", getVar("level-item-spacing"));
|
||||
}
|
||||
|
||||
&:not(.is-narrow) {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Responsiveness
|
||||
@include tablet {
|
||||
display: flex;
|
||||
|
||||
& > .#{$class-prefix}level-item {
|
||||
&:not(.is-narrow) {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}level-item {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-basis: auto;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
|
||||
.#{$class-prefix}title,
|
||||
.#{$class-prefix}subtitle {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// Responsiveness
|
||||
@include mobile {
|
||||
&:not(:last-child) {
|
||||
margin-bottom: getVar("level-item-spacing");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}level-left,
|
||||
.#{$class-prefix}level-right {
|
||||
flex-basis: auto;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
|
||||
.#{$class-prefix}level-item {
|
||||
// Modifiers
|
||||
&.is-flexible {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
// Responsiveness
|
||||
@include tablet {
|
||||
&:not(:last-child) {
|
||||
@include ltr-property("margin", getVar("level-item-spacing"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}level-left {
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
// Responsiveness
|
||||
@include mobile {
|
||||
& + .#{$class-prefix}level-right {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@include tablet {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}level-right {
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
// Responsiveness
|
||||
@include tablet {
|
||||
display: flex;
|
||||
}
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$media-border-color: bulmaRgba($border, 0.5) !default
|
||||
$media-border-size: 1px !default
|
||||
$media-spacing: 1rem !default
|
||||
$media-spacing-large: 1.5rem !default
|
||||
$media-content-spacing: 0.75rem !default
|
||||
$media-level-1-spacing: 0.75rem !default
|
||||
$media-level-1-content-spacing: 0.5rem !default
|
||||
$media-level-2-spacing: 0.5rem !default
|
||||
|
||||
.media
|
||||
align-items: flex-start
|
||||
display: flex
|
||||
text-align: inherit
|
||||
.content:not(:last-child)
|
||||
margin-bottom: $media-content-spacing
|
||||
.media
|
||||
border-top: $media-border-size solid $media-border-color
|
||||
display: flex
|
||||
padding-top: $media-level-1-spacing
|
||||
.content:not(:last-child),
|
||||
.control:not(:last-child)
|
||||
margin-bottom: $media-level-1-content-spacing
|
||||
.media
|
||||
padding-top: $media-level-2-spacing
|
||||
& + .media
|
||||
margin-top: $media-level-2-spacing
|
||||
& + .media
|
||||
border-top: $media-border-size solid $media-border-color
|
||||
margin-top: $media-spacing
|
||||
padding-top: $media-spacing
|
||||
// Sizes
|
||||
&.is-large
|
||||
& + .media
|
||||
margin-top: $media-spacing-large
|
||||
padding-top: $media-spacing-large
|
||||
|
||||
.media-left,
|
||||
.media-right
|
||||
flex-basis: auto
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
|
||||
.media-left
|
||||
+ltr-property("margin", $media-spacing)
|
||||
|
||||
.media-right
|
||||
+ltr-property("margin", $media-spacing, false)
|
||||
|
||||
.media-content
|
||||
flex-basis: auto
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
text-align: inherit
|
||||
|
||||
+mobile
|
||||
.media-content
|
||||
overflow-x: auto
|
100
sass/components/media.scss
Normal file
100
sass/components/media.scss
Normal file
|
@ -0,0 +1,100 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$media-border-color: bulmaRgba($border, 0.5) !default; // TODO
|
||||
$media-border-size: 1px !default;
|
||||
$media-spacing: 1rem !default;
|
||||
$media-spacing-large: 1.5rem !default;
|
||||
$media-content-spacing: 0.75rem !default;
|
||||
$media-level-1-spacing: 0.75rem !default;
|
||||
$media-level-1-content-spacing: 0.5rem !default;
|
||||
$media-level-2-spacing: 0.5rem !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
media-border-color: #{$media-border-color},
|
||||
media-border-size: #{$media-border-size},
|
||||
media-spacing: #{$media-spacing},
|
||||
media-spacing-large: #{$media-spacing-large},
|
||||
media-content-spacing: #{$media-content-spacing},
|
||||
media-level-1-spacing: #{$media-level-1-spacing},
|
||||
media-level-1-content-spacing: #{$media-level-1-content-spacing},
|
||||
media-level-2-spacing: #{$media-level-2-spacing},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}media {
|
||||
align-items: flex-start;
|
||||
display: flex;
|
||||
text-align: inherit;
|
||||
|
||||
.#{$class-prefix}content:not(:last-child) {
|
||||
margin-bottom: getVar("media-content-spacing");
|
||||
}
|
||||
|
||||
.#{$class-prefix}media {
|
||||
border-top-color: getVar("media-border-color");
|
||||
border-top-style: solid;
|
||||
border-top-width: getVar("media-border-size");
|
||||
display: flex;
|
||||
padding-top: getVar("media-level-1-spacing");
|
||||
|
||||
.#{$class-prefix}content:not(:last-child),
|
||||
.#{$class-prefix}control:not(:last-child) {
|
||||
margin-bottom: getVar("media-level-1-content-spacing");
|
||||
}
|
||||
|
||||
.#{$class-prefix}media {
|
||||
padding-top: getVar("media-level-2-spacing");
|
||||
|
||||
& + .#{$class-prefix}media {
|
||||
margin-top: getVar("media-level-2-spacing");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& + .#{$class-prefix}media {
|
||||
border-top-color: getVar("media-border-color");
|
||||
border-top-style: solid;
|
||||
border-top-width: getVar("media-border-size");
|
||||
margin-top: getVar("media-spacing");
|
||||
padding-top: getVar("media-spacing");
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-large {
|
||||
& + .#{$class-prefix}media {
|
||||
margin-top: getVar("media-spacing-large");
|
||||
padding-top: getVar("media-spacing-large");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}media-left,
|
||||
.#{$class-prefix}media-right {
|
||||
flex-basis: auto;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.#{$class-prefix}media-left {
|
||||
@include ltr-property("margin", getVar("media-spacing"));
|
||||
}
|
||||
|
||||
.#{$class-prefix}media-right {
|
||||
@include ltr-property("margin", getVar("media-spacing"), false);
|
||||
}
|
||||
|
||||
.#{$class-prefix}media-content {
|
||||
flex-basis: auto;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
@include mobile {
|
||||
.#{$class-prefix}media-content {
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$menu-item-color: $text !default
|
||||
$menu-item-radius: $radius-small !default
|
||||
$menu-item-hover-color: $text-strong !default
|
||||
$menu-item-hover-background-color: $background !default
|
||||
$menu-item-active-color: $link-invert !default
|
||||
$menu-item-active-background-color: $link !default
|
||||
|
||||
$menu-list-border-left: 1px solid $border !default
|
||||
$menu-list-line-height: 1.25 !default
|
||||
$menu-list-link-padding: 0.5em 0.75em !default
|
||||
$menu-nested-list-margin: 0.75em !default
|
||||
$menu-nested-list-padding-left: 0.75em !default
|
||||
|
||||
$menu-label-color: $text-light !default
|
||||
$menu-label-font-size: 0.75em !default
|
||||
$menu-label-letter-spacing: 0.1em !default
|
||||
$menu-label-spacing: 1em !default
|
||||
|
||||
.menu
|
||||
font-size: $size-normal
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
&.is-large
|
||||
font-size: $size-large
|
||||
|
||||
.menu-list
|
||||
line-height: $menu-list-line-height
|
||||
a
|
||||
border-radius: $menu-item-radius
|
||||
color: $menu-item-color
|
||||
display: block
|
||||
padding: $menu-list-link-padding
|
||||
&:hover
|
||||
background-color: $menu-item-hover-background-color
|
||||
color: $menu-item-hover-color
|
||||
// Modifiers
|
||||
&.is-active
|
||||
background-color: $menu-item-active-background-color
|
||||
color: $menu-item-active-color
|
||||
li
|
||||
ul
|
||||
+ltr-property("border", $menu-list-border-left, false)
|
||||
margin: $menu-nested-list-margin
|
||||
+ltr-property("padding", $menu-nested-list-padding-left, false)
|
||||
|
||||
.menu-label
|
||||
color: $menu-label-color
|
||||
font-size: $menu-label-font-size
|
||||
letter-spacing: $menu-label-letter-spacing
|
||||
text-transform: uppercase
|
||||
&:not(:first-child)
|
||||
margin-top: $menu-label-spacing
|
||||
&:not(:last-child)
|
||||
margin-bottom: $menu-label-spacing
|
107
sass/components/menu.scss
Normal file
107
sass/components/menu.scss
Normal file
|
@ -0,0 +1,107 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$menu-item-color: getVar("text") !default;
|
||||
$menu-item-radius: getVar("radius-small") !default;
|
||||
$menu-item-hover-color: getVar("text-strong") !default;
|
||||
$menu-item-hover-background-color: getVar("background") !default;
|
||||
$menu-item-active-color: getVar("link-invert") !default;
|
||||
$menu-item-active-background-color: getVar("link") !default;
|
||||
|
||||
$menu-list-border-left: 1px solid getVar("border") !default;
|
||||
$menu-list-line-height: 1.25 !default;
|
||||
$menu-list-link-padding: 0.5em 0.75em !default;
|
||||
$menu-nested-list-margin: 0.75em !default;
|
||||
$menu-nested-list-padding-left: 0.75em !default;
|
||||
|
||||
$menu-label-color: getVar("text-light") !default;
|
||||
$menu-label-font-size: 0.75em !default;
|
||||
$menu-label-letter-spacing: 0.1em !default;
|
||||
$menu-label-spacing: 1em !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
menu-item-color: #{$menu-item-color},
|
||||
menu-item-radius: #{$menu-item-radius},
|
||||
menu-item-hover-color: #{$menu-item-hover-color},
|
||||
menu-item-hover-background-color: #{$menu-item-hover-background-color},
|
||||
menu-item-active-color: #{$menu-item-active-color},
|
||||
menu-item-active-background-color: #{$menu-item-active-background-color},
|
||||
menu-list-border-left: #{$menu-list-border-left},
|
||||
menu-list-line-height: #{$menu-list-line-height},
|
||||
menu-list-link-padding: #{$menu-list-link-padding},
|
||||
menu-nested-list-margin: #{$menu-nested-list-margin},
|
||||
menu-nested-list-padding-left: #{$menu-nested-list-padding-left},
|
||||
menu-label-color: #{$menu-label-color},
|
||||
menu-label-font-size: #{$menu-label-font-size},
|
||||
menu-label-letter-spacing: #{$menu-label-letter-spacing},
|
||||
menu-label-spacing: #{$menu-label-spacing},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}menu {
|
||||
font-size: getVar("size-normal");
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: getVar("size-large");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}menu-list {
|
||||
line-height: getVar("menu-list-line-height");
|
||||
|
||||
a {
|
||||
border-radius: getVar("menu-item-radius");
|
||||
color: getVar("menu-item-color");
|
||||
display: block;
|
||||
padding: getVar("menu-list-link-padding");
|
||||
|
||||
&:hover {
|
||||
background-color: getVar("menu-item-hover-background-color");
|
||||
color: getVar("menu-item-hover-color");
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.is-active {
|
||||
background-color: getVar("menu-item-active-background-color");
|
||||
color: getVar("menu-item-active-color");
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
ul {
|
||||
@include ltr-property("border", getVar("menu-list-border-left"), false);
|
||||
margin: getVar("menu-nested-list-margin");
|
||||
@include ltr-property(
|
||||
"padding",
|
||||
getVar("menu-nested-list-padding-left"),
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}menu-label {
|
||||
color: getVar("menu-label-color");
|
||||
font-size: getVar("menu-label-font-size");
|
||||
letter-spacing: getVar("menu-label-letter-spacing");
|
||||
text-transform: uppercase;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: getVar("menu-label-spacing");
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: getVar("menu-label-spacing");
|
||||
}
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$message-background-color: $background !default
|
||||
$message-radius: $radius !default
|
||||
|
||||
$message-header-background-color: $text !default
|
||||
$message-header-color: $text-invert !default
|
||||
$message-header-weight: $weight-bold !default
|
||||
$message-header-padding: 0.75em 1em !default
|
||||
$message-header-radius: $radius !default
|
||||
|
||||
$message-body-border-color: $border !default
|
||||
$message-body-border-width: 0 0 0 4px !default
|
||||
$message-body-color: $text !default
|
||||
$message-body-padding: 1.25em 1.5em !default
|
||||
$message-body-radius: $radius !default
|
||||
|
||||
$message-body-pre-background-color: $scheme-main !default
|
||||
$message-body-pre-code-background-color: transparent !default
|
||||
|
||||
$message-header-body-border-width: 0 !default
|
||||
$message-colors: $colors !default
|
||||
|
||||
.message
|
||||
@extend %block
|
||||
background-color: $message-background-color
|
||||
border-radius: $message-radius
|
||||
font-size: $size-normal
|
||||
strong
|
||||
color: currentColor
|
||||
a:not(.button):not(.tag):not(.dropdown-item)
|
||||
color: currentColor
|
||||
text-decoration: underline
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
&.is-large
|
||||
font-size: $size-large
|
||||
// Colors
|
||||
@each $name, $components in $message-colors
|
||||
$color: nth($components, 1)
|
||||
$color-invert: nth($components, 2)
|
||||
$color-light: null
|
||||
$color-dark: null
|
||||
|
||||
@if length($components) >= 3
|
||||
$color-light: nth($components, 3)
|
||||
@if length($components) >= 4
|
||||
$color-dark: nth($components, 4)
|
||||
@else
|
||||
$color-luminance: colorLuminance($color)
|
||||
$darken-percentage: $color-luminance * 70%
|
||||
$desaturate-percentage: $color-luminance * 30%
|
||||
$color-dark: desaturate(darken($color, $darken-percentage), $desaturate-percentage)
|
||||
@else
|
||||
$color-lightning: max((100% - lightness($color)) - 2%, 0%)
|
||||
$color-light: lighten($color, $color-lightning)
|
||||
|
||||
&.is-#{$name}
|
||||
background-color: $color-light
|
||||
.message-header
|
||||
background-color: $color
|
||||
color: $color-invert
|
||||
.message-body
|
||||
border-color: $color
|
||||
color: $color-dark
|
||||
|
||||
.message-header
|
||||
align-items: center
|
||||
background-color: $message-header-background-color
|
||||
border-radius: $message-header-radius $message-header-radius 0 0
|
||||
color: $message-header-color
|
||||
display: flex
|
||||
font-weight: $message-header-weight
|
||||
justify-content: space-between
|
||||
line-height: 1.25
|
||||
padding: $message-header-padding
|
||||
position: relative
|
||||
.delete
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
+ltr-property("margin", 0.75em, false)
|
||||
& + .message-body
|
||||
border-width: $message-header-body-border-width
|
||||
border-top-left-radius: 0
|
||||
border-top-right-radius: 0
|
||||
|
||||
.message-body
|
||||
border-color: $message-body-border-color
|
||||
border-radius: $message-body-radius
|
||||
border-style: solid
|
||||
border-width: $message-body-border-width
|
||||
color: $message-body-color
|
||||
padding: $message-body-padding
|
||||
code,
|
||||
pre
|
||||
background-color: $message-body-pre-background-color
|
||||
pre code
|
||||
background-color: $message-body-pre-code-background-color
|
196
sass/components/message.scss
Normal file
196
sass/components/message.scss
Normal file
|
@ -0,0 +1,196 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$message-background-color: getVar("background") !default;
|
||||
$message-radius: getVar("radius") !default;
|
||||
|
||||
$message-header-background-color: getVar("text") !default;
|
||||
$message-header-color: getVar("text-invert") !default;
|
||||
$message-header-weight: getVar("weight-bold") !default;
|
||||
$message-header-padding: 0.75em 1em !default;
|
||||
$message-header-radius: getVar("radius") !default;
|
||||
|
||||
$message-body-border-color: getVar("border") !default;
|
||||
$message-body-border-width: 0 0 0 4px !default;
|
||||
$message-body-color: getVar("text") !default;
|
||||
$message-body-padding: 1.25em 1.5em !default;
|
||||
$message-body-radius: getVar("radius") !default;
|
||||
|
||||
$message-body-pre-background-color: getVar("scheme-main") !default;
|
||||
$message-body-pre-code-background-color: transparent !default;
|
||||
|
||||
$message-header-body-border-width: 0 !default;
|
||||
$message-colors: $colors !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
message-background-color: #{$message-background-color},
|
||||
message-radius: #{$message-radius},
|
||||
message-header-background-color: #{$message-header-background-color},
|
||||
message-header-color: #{$message-header-color},
|
||||
message-header-weight: #{$message-header-weight},
|
||||
message-header-padding: #{$message-header-padding},
|
||||
message-header-radius: #{$message-header-radius},
|
||||
message-body-border-color: #{$message-body-border-color},
|
||||
message-body-border-width: #{$message-body-border-width},
|
||||
message-body-color: #{$message-body-color},
|
||||
message-body-padding: #{$message-body-padding},
|
||||
message-body-radius: #{$message-body-radius},
|
||||
message-body-pre-background-color: #{$message-body-pre-background-color},
|
||||
message-body-pre-code-background-color: #{$message-body-pre-code-background-color},
|
||||
message-header-body-border-width: #{$message-header-body-border-width},
|
||||
message-status-background-l: 8%,
|
||||
message-status-color-l: 70%,
|
||||
message-status-header-background-l: 20%,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}message {
|
||||
@extend %block;
|
||||
|
||||
background-color: getVar("message-background-color");
|
||||
border-radius: getVar("message-radius");
|
||||
font-size: getVar("size-normal");
|
||||
|
||||
strong {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
a:not(.#{$class-prefix}button):not(.#{$class-prefix}tag):not(.#{$class-prefix}dropdown-item) {
|
||||
color: currentColor;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: getVar("size-large");
|
||||
}
|
||||
|
||||
// Colors
|
||||
// TODO
|
||||
@each $name, $components in $message-colors {
|
||||
$base-h: getVar($name, "", "-h");
|
||||
$base-s: getVar($name, "", "-s");
|
||||
$base-l: getVar($name, "", "-l");
|
||||
$invert: getVar($name, "", "-invert");
|
||||
$base: hsl($base-h, var(--s), var(--l));
|
||||
|
||||
&.is-#{$name} {
|
||||
--base-s: #{$base-s};
|
||||
--base-l: #{$base-l};
|
||||
background: none;
|
||||
|
||||
.#{$class-prefix}message-header {
|
||||
background-color: hsl(
|
||||
$base-h,
|
||||
var(--base-s),
|
||||
var(--bulma-message-status-header-background-l)
|
||||
);
|
||||
color: $invert;
|
||||
}
|
||||
|
||||
.#{$class-prefix}message-body {
|
||||
background-color: hsl(
|
||||
$base-h,
|
||||
var(--base-s),
|
||||
var(--bulma-message-status-background-l)
|
||||
);
|
||||
color: hsl($base-h, var(--base-s), var(--bulma-message-status-color-l));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @each $name, $components in $message-colors {
|
||||
// $color: nth($components, 1);
|
||||
// $color-invert: nth($components, 2);
|
||||
// $color-light: null;
|
||||
// $color-dark: null;
|
||||
|
||||
// @if length($components) >= 3 {
|
||||
// $color-light: nth($components, 3);
|
||||
|
||||
// @if length($components) >= 4 {
|
||||
// $color-dark: nth($components, 4);
|
||||
// } @else {
|
||||
// $color-luminance: colorLuminance($color);
|
||||
// $darken-percentage: $color-luminance * 70%;
|
||||
// $desaturate-percentage: $color-luminance * 30%;
|
||||
// $color-dark: desaturate(
|
||||
// darken($color, $darken-percentage),
|
||||
// $desaturate-percentage
|
||||
// );
|
||||
// }
|
||||
// } @else {
|
||||
// $color-lightning: max(100% - lightness($color) - 2%, 0%);
|
||||
// $color-light: lighten($color, $color-lightning);
|
||||
// }
|
||||
|
||||
// &.is-#{$name} {
|
||||
// background-color: $color-light;
|
||||
|
||||
// .#{$class-prefix}message-header {
|
||||
// background-color: $color;
|
||||
// color: $color-invert;
|
||||
// }
|
||||
|
||||
// .#{$class-prefix}message-body {
|
||||
// border-color: $color;
|
||||
// color: $color-dark;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
.#{$class-prefix}message-header {
|
||||
align-items: center;
|
||||
background-color: getVar("message-header-background-color");
|
||||
border-radius: getVar("message-header-radius") getVar("message-header-radius")
|
||||
0 0;
|
||||
color: getVar("message-header-color");
|
||||
display: flex;
|
||||
font-weight: getVar("message-header-weight");
|
||||
justify-content: space-between;
|
||||
line-height: 1.25;
|
||||
padding: getVar("message-header-padding");
|
||||
position: relative;
|
||||
|
||||
.#{$class-prefix}delete {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
|
||||
@include ltr-property("margin", 0.75em, false);
|
||||
}
|
||||
|
||||
& + .#{$class-prefix}message-body {
|
||||
border-width: getVar("message-header-body-border-width");
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}message-body {
|
||||
border-color: getVar("message-body-border-color");
|
||||
border-radius: getVar("message-body-radius");
|
||||
border-style: solid;
|
||||
border-width: getVar("message-body-border-width");
|
||||
color: getVar("message-body-color");
|
||||
padding: getVar("message-body-padding");
|
||||
|
||||
code,
|
||||
pre {
|
||||
background-color: getVar("message-body-pre-background-color");
|
||||
}
|
||||
|
||||
pre code {
|
||||
background-color: getVar("message-body-pre-code-background-color");
|
||||
}
|
||||
}
|
|
@ -1,117 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$modal-z: 40 !default
|
||||
|
||||
$modal-background-background-color: bulmaRgba($scheme-invert, 0.86) !default
|
||||
|
||||
$modal-content-width: 640px !default
|
||||
$modal-content-margin-mobile: 20px !default
|
||||
$modal-content-spacing-mobile: 160px !default
|
||||
$modal-content-spacing-tablet: 40px !default
|
||||
|
||||
$modal-close-dimensions: 40px !default
|
||||
$modal-close-right: 20px !default
|
||||
$modal-close-top: 20px !default
|
||||
|
||||
$modal-card-spacing: 40px !default
|
||||
|
||||
$modal-card-head-background-color: $background !default
|
||||
$modal-card-head-border-bottom: 1px solid $border !default
|
||||
$modal-card-head-padding: 20px !default
|
||||
$modal-card-head-radius: $radius-large !default
|
||||
|
||||
$modal-card-title-color: $text-strong !default
|
||||
$modal-card-title-line-height: 1 !default
|
||||
$modal-card-title-size: $size-4 !default
|
||||
|
||||
$modal-card-foot-radius: $radius-large !default
|
||||
$modal-card-foot-border-top: 1px solid $border !default
|
||||
|
||||
$modal-card-body-background-color: $scheme-main !default
|
||||
$modal-card-body-padding: 20px !default
|
||||
|
||||
$modal-breakpoint: $tablet !default
|
||||
|
||||
.modal
|
||||
@extend %overlay
|
||||
align-items: center
|
||||
display: none
|
||||
flex-direction: column
|
||||
justify-content: center
|
||||
overflow: hidden
|
||||
position: fixed
|
||||
z-index: $modal-z
|
||||
// Modifiers
|
||||
&.is-active
|
||||
display: flex
|
||||
|
||||
.modal-background
|
||||
@extend %overlay
|
||||
background-color: $modal-background-background-color
|
||||
|
||||
.modal-content,
|
||||
.modal-card
|
||||
margin: 0 $modal-content-margin-mobile
|
||||
max-height: calc(100vh - #{$modal-content-spacing-mobile})
|
||||
overflow: auto
|
||||
position: relative
|
||||
width: 100%
|
||||
// Responsiveness
|
||||
+from($modal-breakpoint)
|
||||
margin: 0 auto
|
||||
max-height: calc(100vh - #{$modal-content-spacing-tablet})
|
||||
width: $modal-content-width
|
||||
|
||||
.modal-close
|
||||
@extend %delete
|
||||
background: none
|
||||
height: $modal-close-dimensions
|
||||
position: fixed
|
||||
+ltr-position($modal-close-right)
|
||||
top: $modal-close-top
|
||||
width: $modal-close-dimensions
|
||||
|
||||
.modal-card
|
||||
display: flex
|
||||
flex-direction: column
|
||||
max-height: calc(100vh - #{$modal-card-spacing})
|
||||
overflow: hidden
|
||||
-ms-overflow-y: visible
|
||||
|
||||
.modal-card-head,
|
||||
.modal-card-foot
|
||||
align-items: center
|
||||
background-color: $modal-card-head-background-color
|
||||
display: flex
|
||||
flex-shrink: 0
|
||||
justify-content: flex-start
|
||||
padding: $modal-card-head-padding
|
||||
position: relative
|
||||
|
||||
.modal-card-head
|
||||
border-bottom: $modal-card-head-border-bottom
|
||||
border-top-left-radius: $modal-card-head-radius
|
||||
border-top-right-radius: $modal-card-head-radius
|
||||
|
||||
.modal-card-title
|
||||
color: $modal-card-title-color
|
||||
flex-grow: 1
|
||||
flex-shrink: 0
|
||||
font-size: $modal-card-title-size
|
||||
line-height: $modal-card-title-line-height
|
||||
|
||||
.modal-card-foot
|
||||
border-bottom-left-radius: $modal-card-foot-radius
|
||||
border-bottom-right-radius: $modal-card-foot-radius
|
||||
border-top: $modal-card-foot-border-top
|
||||
.button
|
||||
&:not(:last-child)
|
||||
+ltr-property("margin", 0.5em)
|
||||
|
||||
.modal-card-body
|
||||
+overflow-touch
|
||||
background-color: $modal-card-body-background-color
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
overflow: auto
|
||||
padding: $modal-card-body-padding
|
169
sass/components/modal.scss
Normal file
169
sass/components/modal.scss
Normal file
|
@ -0,0 +1,169 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$modal-z: 40 !default;
|
||||
|
||||
$modal-background-background-color: bulmaRgba(
|
||||
getVar("shadow-color-rgb"),
|
||||
0.86
|
||||
) !default;
|
||||
|
||||
$modal-content-width: 640px !default;
|
||||
$modal-content-margin-mobile: 20px !default;
|
||||
$modal-content-spacing-mobile: 160px !default;
|
||||
$modal-content-spacing-tablet: 40px !default;
|
||||
|
||||
$modal-close-dimensions: 40px !default;
|
||||
$modal-close-right: 20px !default;
|
||||
$modal-close-top: 20px !default;
|
||||
|
||||
$modal-card-spacing: 40px !default;
|
||||
|
||||
$modal-card-head-background-color: getVar("background") !default;
|
||||
$modal-card-head-border-bottom: 1px solid getVar("border") !default;
|
||||
$modal-card-head-padding: 20px !default;
|
||||
$modal-card-head-radius: getVar("radius-large") !default;
|
||||
|
||||
$modal-card-title-color: getVar("text-strong") !default;
|
||||
$modal-card-title-line-height: 1 !default;
|
||||
$modal-card-title-size: getVar("size-4") !default;
|
||||
|
||||
$modal-card-foot-radius: getVar("radius-large") !default;
|
||||
$modal-card-foot-border-top: 1px solid getVar("border") !default;
|
||||
|
||||
$modal-card-body-background-color: getVar("scheme-main") !default;
|
||||
$modal-card-body-padding: 20px !default;
|
||||
|
||||
$modal-breakpoint: $tablet !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
modal-z: #{$modal-z},
|
||||
modal-background-background-color: #{$modal-background-background-color},
|
||||
modal-content-width: #{$modal-content-width},
|
||||
modal-content-margin-mobile: #{$modal-content-margin-mobile},
|
||||
modal-content-spacing-mobile: #{$modal-content-spacing-mobile},
|
||||
modal-content-spacing-tablet: #{$modal-content-spacing-tablet},
|
||||
modal-close-dimensions: #{$modal-close-dimensions},
|
||||
modal-close-right: #{$modal-close-right},
|
||||
modal-close-top: #{$modal-close-top},
|
||||
modal-card-spacing: #{$modal-card-spacing},
|
||||
modal-card-head-background-color: #{$modal-card-head-background-color},
|
||||
modal-card-head-border-bottom: #{$modal-card-head-border-bottom},
|
||||
modal-card-head-padding: #{$modal-card-head-padding},
|
||||
modal-card-head-radius: #{$modal-card-head-radius},
|
||||
modal-card-title-color: #{$modal-card-title-color},
|
||||
modal-card-title-line-height: #{$modal-card-title-line-height},
|
||||
modal-card-title-size: #{$modal-card-title-size},
|
||||
modal-card-foot-radius: #{$modal-card-foot-radius},
|
||||
modal-card-foot-border-top: #{$modal-card-foot-border-top},
|
||||
modal-card-body-background-color: #{$modal-card-body-background-color},
|
||||
modal-card-body-padding: #{$modal-card-body-padding},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal {
|
||||
@extend %overlay;
|
||||
|
||||
align-items: center;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
z-index: getVar("modal-z");
|
||||
|
||||
// Modifiers
|
||||
&.is-active {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-background {
|
||||
@extend %overlay;
|
||||
|
||||
background-color: getVar("modal-background-background-color");
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-content,
|
||||
.#{$class-prefix}modal-card {
|
||||
margin: 0 getVar("modal-content-margin-mobile");
|
||||
max-height: calc(100vh - #{getVar("modal-content-spacing-mobile")});
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
// Responsiveness
|
||||
@include from($modal-breakpoint) {
|
||||
margin: 0 auto;
|
||||
max-height: calc(100vh - #{getVar("modal-content-spacing-tablet")});
|
||||
width: getVar("modal-content-width");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-close {
|
||||
@extend %delete;
|
||||
|
||||
background: none;
|
||||
height: getVar("modal-close-dimensions");
|
||||
position: fixed;
|
||||
@include ltr-position(getVar("modal-close-right"));
|
||||
top: getVar("modal-close-top");
|
||||
width: getVar("modal-close-dimensions");
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: calc(100vh - #{getVar("modal-card-spacing")});
|
||||
overflow: hidden;
|
||||
-ms-overflow-y: visible;
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-card-head,
|
||||
.#{$class-prefix}modal-card-foot {
|
||||
align-items: center;
|
||||
background-color: getVar("modal-card-head-background-color");
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
justify-content: flex-start;
|
||||
padding: getVar("modal-card-head-padding");
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-card-head {
|
||||
border-bottom: getVar("modal-card-head-border-bottom");
|
||||
border-top-left-radius: getVar("modal-card-head-radius");
|
||||
border-top-right-radius: getVar("modal-card-head-radius");
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-card-title {
|
||||
color: getVar("modal-card-title-color");
|
||||
flex-grow: 1;
|
||||
flex-shrink: 0;
|
||||
font-size: getVar("modal-card-title-size");
|
||||
line-height: getVar("modal-card-title-line-height");
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-card-foot {
|
||||
border-bottom-left-radius: getVar("modal-card-foot-radius");
|
||||
border-bottom-right-radius: getVar("modal-card-foot-radius");
|
||||
border-top: getVar("modal-card-foot-border-top");
|
||||
|
||||
.#{$class-prefix}button {
|
||||
&:not(:last-child) {
|
||||
@include ltr-property("margin", 0.5em);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}modal-card-body {
|
||||
@include overflow-touch;
|
||||
|
||||
background-color: getVar("modal-card-body-background-color");
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
overflow: auto;
|
||||
padding: getVar("modal-card-body-padding");
|
||||
}
|
|
@ -1,446 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$navbar-background-color: $scheme-main !default
|
||||
$navbar-box-shadow-size: 0 2px 0 0 !default
|
||||
$navbar-box-shadow-color: $background !default
|
||||
$navbar-height: 3.25rem !default
|
||||
$navbar-padding-vertical: 1rem !default
|
||||
$navbar-padding-horizontal: 2rem !default
|
||||
$navbar-z: 30 !default
|
||||
$navbar-fixed-z: 30 !default
|
||||
|
||||
$navbar-item-color: $text !default
|
||||
$navbar-item-hover-color: $link !default
|
||||
$navbar-item-hover-background-color: $scheme-main-bis !default
|
||||
$navbar-item-active-color: $scheme-invert !default
|
||||
$navbar-item-active-background-color: transparent !default
|
||||
$navbar-item-img-max-height: 1.75rem !default
|
||||
|
||||
$navbar-burger-color: $navbar-item-color !default
|
||||
|
||||
$navbar-tab-hover-background-color: transparent !default
|
||||
$navbar-tab-hover-border-bottom-color: $link !default
|
||||
$navbar-tab-active-color: $link !default
|
||||
$navbar-tab-active-background-color: transparent !default
|
||||
$navbar-tab-active-border-bottom-color: $link !default
|
||||
$navbar-tab-active-border-bottom-style: solid !default
|
||||
$navbar-tab-active-border-bottom-width: 3px !default
|
||||
|
||||
$navbar-dropdown-background-color: $scheme-main !default
|
||||
$navbar-dropdown-border-top: 2px solid $border !default
|
||||
$navbar-dropdown-offset: -4px !default
|
||||
$navbar-dropdown-arrow: $link !default
|
||||
$navbar-dropdown-radius: $radius-large !default
|
||||
$navbar-dropdown-z: 20 !default
|
||||
|
||||
$navbar-dropdown-boxed-radius: $radius-large !default
|
||||
$navbar-dropdown-boxed-shadow: 0 8px 8px bulmaRgba($scheme-invert, 0.1), 0 0 0 1px bulmaRgba($scheme-invert, 0.1) !default
|
||||
|
||||
$navbar-dropdown-item-hover-color: $scheme-invert !default
|
||||
$navbar-dropdown-item-hover-background-color: $background !default
|
||||
$navbar-dropdown-item-active-color: $link !default
|
||||
$navbar-dropdown-item-active-background-color: $background !default
|
||||
|
||||
$navbar-divider-background-color: $background !default
|
||||
$navbar-divider-height: 2px !default
|
||||
|
||||
$navbar-bottom-box-shadow-size: 0 -2px 0 0 !default
|
||||
|
||||
$navbar-breakpoint: $desktop !default
|
||||
|
||||
$navbar-colors: $colors !default
|
||||
|
||||
=navbar-fixed
|
||||
left: 0
|
||||
position: fixed
|
||||
right: 0
|
||||
z-index: $navbar-fixed-z
|
||||
|
||||
.navbar
|
||||
background-color: $navbar-background-color
|
||||
min-height: $navbar-height
|
||||
position: relative
|
||||
z-index: $navbar-z
|
||||
@each $name, $pair in $navbar-colors
|
||||
$color: nth($pair, 1)
|
||||
$color-invert: nth($pair, 2)
|
||||
&.is-#{$name}
|
||||
background-color: $color
|
||||
color: $color-invert
|
||||
.navbar-brand
|
||||
& > .navbar-item,
|
||||
.navbar-link
|
||||
color: $color-invert
|
||||
& > a.navbar-item,
|
||||
.navbar-link
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active
|
||||
background-color: bulmaDarken($color, 5%)
|
||||
color: $color-invert
|
||||
.navbar-link
|
||||
&::after
|
||||
border-color: $color-invert
|
||||
.navbar-burger
|
||||
color: $color-invert
|
||||
+from($navbar-breakpoint)
|
||||
.navbar-start,
|
||||
.navbar-end
|
||||
& > .navbar-item,
|
||||
.navbar-link
|
||||
color: $color-invert
|
||||
& > a.navbar-item,
|
||||
.navbar-link
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active
|
||||
background-color: bulmaDarken($color, 5%)
|
||||
color: $color-invert
|
||||
.navbar-link
|
||||
&::after
|
||||
border-color: $color-invert
|
||||
.navbar-item.has-dropdown:focus .navbar-link,
|
||||
.navbar-item.has-dropdown:hover .navbar-link,
|
||||
.navbar-item.has-dropdown.is-active .navbar-link
|
||||
background-color: bulmaDarken($color, 5%)
|
||||
color: $color-invert
|
||||
.navbar-dropdown
|
||||
a.navbar-item
|
||||
&.is-active
|
||||
background-color: $color
|
||||
color: $color-invert
|
||||
& > .container
|
||||
align-items: stretch
|
||||
display: flex
|
||||
min-height: $navbar-height
|
||||
width: 100%
|
||||
&.has-shadow
|
||||
box-shadow: $navbar-box-shadow-size $navbar-box-shadow-color
|
||||
&.is-fixed-bottom,
|
||||
&.is-fixed-top
|
||||
+navbar-fixed
|
||||
&.is-fixed-bottom
|
||||
bottom: 0
|
||||
&.has-shadow
|
||||
box-shadow: $navbar-bottom-box-shadow-size $navbar-box-shadow-color
|
||||
&.is-fixed-top
|
||||
top: 0
|
||||
|
||||
html,
|
||||
body
|
||||
&.has-navbar-fixed-top
|
||||
padding-top: $navbar-height
|
||||
&.has-navbar-fixed-bottom
|
||||
padding-bottom: $navbar-height
|
||||
|
||||
.navbar-brand,
|
||||
.navbar-tabs
|
||||
align-items: stretch
|
||||
display: flex
|
||||
flex-shrink: 0
|
||||
min-height: $navbar-height
|
||||
|
||||
.navbar-brand
|
||||
a.navbar-item
|
||||
&:focus,
|
||||
&:hover
|
||||
background-color: transparent
|
||||
|
||||
.navbar-tabs
|
||||
+overflow-touch
|
||||
max-width: 100vw
|
||||
overflow-x: auto
|
||||
overflow-y: hidden
|
||||
|
||||
.navbar-burger
|
||||
@extend %reset
|
||||
color: $navbar-burger-color
|
||||
+hamburger($navbar-height)
|
||||
+ltr-property("margin", auto, false)
|
||||
|
||||
.navbar-menu
|
||||
display: none
|
||||
|
||||
.navbar-item,
|
||||
.navbar-link
|
||||
color: $navbar-item-color
|
||||
display: block
|
||||
line-height: 1.5
|
||||
padding: 0.5rem 0.75rem
|
||||
position: relative
|
||||
.icon
|
||||
&:only-child
|
||||
margin-left: -0.25rem
|
||||
margin-right: -0.25rem
|
||||
|
||||
a.navbar-item,
|
||||
.navbar-link
|
||||
cursor: pointer
|
||||
&:focus,
|
||||
&:focus-within,
|
||||
&:hover,
|
||||
&.is-active
|
||||
background-color: $navbar-item-hover-background-color
|
||||
color: $navbar-item-hover-color
|
||||
|
||||
.navbar-item
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
img
|
||||
max-height: $navbar-item-img-max-height
|
||||
&.has-dropdown
|
||||
padding: 0
|
||||
&.is-expanded
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
&.is-tab
|
||||
border-bottom: 1px solid transparent
|
||||
min-height: $navbar-height
|
||||
padding-bottom: calc(0.5rem - 1px)
|
||||
&:focus,
|
||||
&:hover
|
||||
background-color: $navbar-tab-hover-background-color
|
||||
border-bottom-color: $navbar-tab-hover-border-bottom-color
|
||||
&.is-active
|
||||
background-color: $navbar-tab-active-background-color
|
||||
border-bottom-color: $navbar-tab-active-border-bottom-color
|
||||
border-bottom-style: $navbar-tab-active-border-bottom-style
|
||||
border-bottom-width: $navbar-tab-active-border-bottom-width
|
||||
color: $navbar-tab-active-color
|
||||
padding-bottom: calc(0.5rem - #{$navbar-tab-active-border-bottom-width})
|
||||
|
||||
.navbar-content
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
|
||||
.navbar-link:not(.is-arrowless)
|
||||
+ltr-property("padding", 2.5em)
|
||||
&::after
|
||||
@extend %arrow
|
||||
border-color: $navbar-dropdown-arrow
|
||||
margin-top: -0.375em
|
||||
+ltr-position(1.125em)
|
||||
|
||||
.navbar-dropdown
|
||||
font-size: 0.875rem
|
||||
padding-bottom: 0.5rem
|
||||
padding-top: 0.5rem
|
||||
.navbar-item
|
||||
padding-left: 1.5rem
|
||||
padding-right: 1.5rem
|
||||
|
||||
.navbar-divider
|
||||
background-color: $navbar-divider-background-color
|
||||
border: none
|
||||
display: none
|
||||
height: $navbar-divider-height
|
||||
margin: 0.5rem 0
|
||||
|
||||
+until($navbar-breakpoint)
|
||||
.navbar > .container
|
||||
display: block
|
||||
.navbar-brand,
|
||||
.navbar-tabs
|
||||
.navbar-item
|
||||
align-items: center
|
||||
display: flex
|
||||
.navbar-link
|
||||
&::after
|
||||
display: none
|
||||
.navbar-menu
|
||||
background-color: $navbar-background-color
|
||||
box-shadow: 0 8px 16px bulmaRgba($scheme-invert, 0.1)
|
||||
padding: 0.5rem 0
|
||||
&.is-active
|
||||
display: block
|
||||
// Fixed navbar
|
||||
.navbar
|
||||
&.is-fixed-bottom-touch,
|
||||
&.is-fixed-top-touch
|
||||
+navbar-fixed
|
||||
&.is-fixed-bottom-touch
|
||||
bottom: 0
|
||||
&.has-shadow
|
||||
box-shadow: 0 -2px 3px bulmaRgba($scheme-invert, 0.1)
|
||||
&.is-fixed-top-touch
|
||||
top: 0
|
||||
&.is-fixed-top,
|
||||
&.is-fixed-top-touch
|
||||
.navbar-menu
|
||||
+overflow-touch
|
||||
max-height: calc(100vh - #{$navbar-height})
|
||||
overflow: auto
|
||||
html,
|
||||
body
|
||||
&.has-navbar-fixed-top-touch
|
||||
padding-top: $navbar-height
|
||||
&.has-navbar-fixed-bottom-touch
|
||||
padding-bottom: $navbar-height
|
||||
|
||||
+from($navbar-breakpoint)
|
||||
.navbar,
|
||||
.navbar-menu,
|
||||
.navbar-start,
|
||||
.navbar-end
|
||||
align-items: stretch
|
||||
display: flex
|
||||
.navbar
|
||||
min-height: $navbar-height
|
||||
&.is-spaced
|
||||
padding: $navbar-padding-vertical $navbar-padding-horizontal
|
||||
.navbar-start,
|
||||
.navbar-end
|
||||
align-items: center
|
||||
a.navbar-item,
|
||||
.navbar-link
|
||||
border-radius: $radius
|
||||
&.is-transparent
|
||||
a.navbar-item,
|
||||
.navbar-link
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active
|
||||
background-color: transparent !important
|
||||
.navbar-item.has-dropdown
|
||||
&.is-active,
|
||||
&.is-hoverable:focus,
|
||||
&.is-hoverable:focus-within,
|
||||
&.is-hoverable:hover
|
||||
.navbar-link
|
||||
background-color: transparent !important
|
||||
.navbar-dropdown
|
||||
a.navbar-item
|
||||
&:focus,
|
||||
&:hover
|
||||
background-color: $navbar-dropdown-item-hover-background-color
|
||||
color: $navbar-dropdown-item-hover-color
|
||||
&.is-active
|
||||
background-color: $navbar-dropdown-item-active-background-color
|
||||
color: $navbar-dropdown-item-active-color
|
||||
.navbar-burger
|
||||
display: none
|
||||
.navbar-item,
|
||||
.navbar-link
|
||||
align-items: center
|
||||
display: flex
|
||||
.navbar-item
|
||||
&.has-dropdown
|
||||
align-items: stretch
|
||||
&.has-dropdown-up
|
||||
.navbar-link::after
|
||||
transform: rotate(135deg) translate(0.25em, -0.25em)
|
||||
.navbar-dropdown
|
||||
border-bottom: $navbar-dropdown-border-top
|
||||
border-radius: $navbar-dropdown-radius $navbar-dropdown-radius 0 0
|
||||
border-top: none
|
||||
bottom: 100%
|
||||
box-shadow: 0 -8px 8px bulmaRgba($scheme-invert, 0.1)
|
||||
top: auto
|
||||
&.is-active,
|
||||
&.is-hoverable:focus,
|
||||
&.is-hoverable:focus-within,
|
||||
&.is-hoverable:hover
|
||||
.navbar-dropdown
|
||||
display: block
|
||||
.navbar.is-spaced &,
|
||||
&.is-boxed
|
||||
opacity: 1
|
||||
pointer-events: auto
|
||||
transform: translateY(0)
|
||||
.navbar-menu
|
||||
flex-grow: 1
|
||||
flex-shrink: 0
|
||||
.navbar-start
|
||||
justify-content: flex-start
|
||||
+ltr-property("margin", auto)
|
||||
.navbar-end
|
||||
justify-content: flex-end
|
||||
+ltr-property("margin", auto, false)
|
||||
.navbar-dropdown
|
||||
background-color: $navbar-dropdown-background-color
|
||||
border-bottom-left-radius: $navbar-dropdown-radius
|
||||
border-bottom-right-radius: $navbar-dropdown-radius
|
||||
border-top: $navbar-dropdown-border-top
|
||||
box-shadow: 0 8px 8px bulmaRgba($scheme-invert, 0.1)
|
||||
display: none
|
||||
font-size: 0.875rem
|
||||
+ltr-position(0, false)
|
||||
min-width: 100%
|
||||
position: absolute
|
||||
top: 100%
|
||||
z-index: $navbar-dropdown-z
|
||||
.navbar-item
|
||||
padding: 0.375rem 1rem
|
||||
white-space: nowrap
|
||||
a.navbar-item
|
||||
+ltr-property("padding", 3rem)
|
||||
&:focus,
|
||||
&:hover
|
||||
background-color: $navbar-dropdown-item-hover-background-color
|
||||
color: $navbar-dropdown-item-hover-color
|
||||
&.is-active
|
||||
background-color: $navbar-dropdown-item-active-background-color
|
||||
color: $navbar-dropdown-item-active-color
|
||||
.navbar.is-spaced &,
|
||||
&.is-boxed
|
||||
border-radius: $navbar-dropdown-boxed-radius
|
||||
border-top: none
|
||||
box-shadow: $navbar-dropdown-boxed-shadow
|
||||
display: block
|
||||
opacity: 0
|
||||
pointer-events: none
|
||||
top: calc(100% + (#{$navbar-dropdown-offset}))
|
||||
transform: translateY(-5px)
|
||||
transition-duration: $speed
|
||||
transition-property: opacity, transform
|
||||
&.is-right
|
||||
left: auto
|
||||
right: 0
|
||||
.navbar-divider
|
||||
display: block
|
||||
.navbar > .container,
|
||||
.container > .navbar
|
||||
.navbar-brand
|
||||
+ltr-property("margin", -.75rem, false)
|
||||
.navbar-menu
|
||||
+ltr-property("margin", -.75rem)
|
||||
// Fixed navbar
|
||||
.navbar
|
||||
&.is-fixed-bottom-desktop,
|
||||
&.is-fixed-top-desktop
|
||||
+navbar-fixed
|
||||
&.is-fixed-bottom-desktop
|
||||
bottom: 0
|
||||
&.has-shadow
|
||||
box-shadow: 0 -2px 3px bulmaRgba($scheme-invert, 0.1)
|
||||
&.is-fixed-top-desktop
|
||||
top: 0
|
||||
html,
|
||||
body
|
||||
&.has-navbar-fixed-top-desktop
|
||||
padding-top: $navbar-height
|
||||
&.has-navbar-fixed-bottom-desktop
|
||||
padding-bottom: $navbar-height
|
||||
&.has-spaced-navbar-fixed-top
|
||||
padding-top: $navbar-height + ($navbar-padding-vertical * 2)
|
||||
&.has-spaced-navbar-fixed-bottom
|
||||
padding-bottom: $navbar-height + ($navbar-padding-vertical * 2)
|
||||
// Hover/Active states
|
||||
a.navbar-item,
|
||||
.navbar-link
|
||||
&.is-active
|
||||
color: $navbar-item-active-color
|
||||
&.is-active:not(:focus):not(:hover)
|
||||
background-color: $navbar-item-active-background-color
|
||||
.navbar-item.has-dropdown
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active
|
||||
.navbar-link
|
||||
background-color: $navbar-item-hover-background-color
|
||||
|
||||
// Combination
|
||||
|
||||
.hero
|
||||
&.is-fullheight-with-navbar
|
||||
min-height: calc(100vh - #{$navbar-height})
|
729
sass/components/navbar.scss
Normal file
729
sass/components/navbar.scss
Normal file
|
@ -0,0 +1,729 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$navbar-background-color: getVar("scheme-main") !default;
|
||||
$navbar-box-shadow-size: 0 2px 0 0 !default;
|
||||
$navbar-box-shadow-color: getVar("background") !default;
|
||||
$navbar-height: 3.25rem !default;
|
||||
$navbar-padding-vertical: 1rem !default;
|
||||
$navbar-padding-horizontal: 2rem !default;
|
||||
$navbar-z: 30 !default;
|
||||
$navbar-fixed-z: 30 !default;
|
||||
|
||||
$navbar-item-color: getVar("text") !default;
|
||||
$navbar-item-hover-color: getVar("link") !default;
|
||||
$navbar-item-hover-background-color: getVar("scheme-main-bis") !default;
|
||||
$navbar-item-active-color: getVar("scheme-invert") !default;
|
||||
$navbar-item-active-background-color: transparent !default;
|
||||
$navbar-item-img-max-height: 1.75rem !default;
|
||||
|
||||
$navbar-burger-color: getVar("navbar-item-color") !default;
|
||||
|
||||
$navbar-tab-hover-background-color: transparent !default;
|
||||
$navbar-tab-hover-border-bottom-color: getVar("link") !default;
|
||||
$navbar-tab-active-color: getVar("link") !default;
|
||||
$navbar-tab-active-background-color: transparent !default;
|
||||
$navbar-tab-active-border-bottom-color: getVar("link") !default;
|
||||
$navbar-tab-active-border-bottom-style: solid !default;
|
||||
$navbar-tab-active-border-bottom-width: 3px !default;
|
||||
|
||||
$navbar-dropdown-background-color: getVar("scheme-main") !default;
|
||||
$navbar-dropdown-border-top: 2px solid getVar("border") !default;
|
||||
$navbar-dropdown-offset: -4px !default;
|
||||
$navbar-dropdown-arrow: getVar("link") !default;
|
||||
$navbar-dropdown-radius: getVar("radius-large") !default;
|
||||
$navbar-dropdown-z: 20 !default;
|
||||
|
||||
$navbar-dropdown-boxed-radius: getVar("radius-large") !default;
|
||||
$navbar-dropdown-boxed-shadow: 0 8px 8px
|
||||
bulmaRgba(getVar("shadow-color-rgb"), 0.1),
|
||||
0 0 0 1px bulmaRgba(getVar("shadow-color-rgb"), 0.1) !default;
|
||||
|
||||
$navbar-dropdown-item-hover-color: getVar("scheme-invert") !default;
|
||||
$navbar-dropdown-item-hover-background-color: getVar("background") !default;
|
||||
$navbar-dropdown-item-active-color: getVar("link") !default;
|
||||
$navbar-dropdown-item-active-background-color: getVar("background") !default;
|
||||
|
||||
$navbar-divider-background-color: getVar("background") !default;
|
||||
$navbar-divider-height: 2px !default;
|
||||
|
||||
$navbar-bottom-box-shadow-size: 0 -2px 0 0 !default;
|
||||
|
||||
$navbar-breakpoint: $desktop !default;
|
||||
|
||||
$navbar-colors: $colors !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
navbar-background-color: #{$navbar-background-color},
|
||||
navbar-box-shadow-size: #{$navbar-box-shadow-size},
|
||||
navbar-box-shadow-color: #{$navbar-box-shadow-color},
|
||||
navbar-height: #{$navbar-height},
|
||||
navbar-padding-vertical: #{$navbar-padding-vertical},
|
||||
navbar-padding-horizontal: #{$navbar-padding-horizontal},
|
||||
navbar-z: #{$navbar-z},
|
||||
navbar-fixed-z: #{$navbar-fixed-z},
|
||||
navbar-item-color: #{$navbar-item-color},
|
||||
navbar-item-hover-color: #{$navbar-item-hover-color},
|
||||
navbar-item-hover-background-color: #{$navbar-item-hover-background-color},
|
||||
navbar-item-active-color: #{$navbar-item-active-color},
|
||||
navbar-item-active-background-color: #{$navbar-item-active-background-color},
|
||||
navbar-item-img-max-height: #{$navbar-item-img-max-height},
|
||||
navbar-burger-color: #{$navbar-burger-color},
|
||||
navbar-tab-hover-background-color: #{$navbar-tab-hover-background-color},
|
||||
navbar-tab-hover-border-bottom-color: #{$navbar-tab-hover-border-bottom-color},
|
||||
navbar-tab-active-color: #{$navbar-tab-active-color},
|
||||
navbar-tab-active-background-color: #{$navbar-tab-active-background-color},
|
||||
navbar-tab-active-border-bottom-color: #{$navbar-tab-active-border-bottom-color},
|
||||
navbar-tab-active-border-bottom-style: #{$navbar-tab-active-border-bottom-style},
|
||||
navbar-tab-active-border-bottom-width: #{$navbar-tab-active-border-bottom-width},
|
||||
navbar-dropdown-background-color: #{$navbar-dropdown-background-color},
|
||||
navbar-dropdown-border-top: #{$navbar-dropdown-border-top},
|
||||
navbar-dropdown-offset: #{$navbar-dropdown-offset},
|
||||
navbar-dropdown-arrow: #{$navbar-dropdown-arrow},
|
||||
navbar-dropdown-radius: #{$navbar-dropdown-radius},
|
||||
navbar-dropdown-z: #{$navbar-dropdown-z},
|
||||
navbar-dropdown-boxed-radius: #{$navbar-dropdown-boxed-radius},
|
||||
navbar-dropdown-boxed-shadow: #{$navbar-dropdown-boxed-shadow},
|
||||
navbar-dropdown-item-hover-color: #{$navbar-dropdown-item-hover-color},
|
||||
navbar-dropdown-item-hover-background-color: #{$navbar-dropdown-item-hover-background-color},
|
||||
navbar-dropdown-item-active-color: #{$navbar-dropdown-item-active-color},
|
||||
navbar-dropdown-item-active-background-color: #{$navbar-dropdown-item-active-background-color},
|
||||
navbar-divider-background-color: #{$navbar-divider-background-color},
|
||||
navbar-divider-height: #{$navbar-divider-height},
|
||||
navbar-bottom-box-shadow-size: #{$navbar-bottom-box-shadow-size},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@mixin navbar-fixed {
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
z-index: getVar("navbar-fixed-z");
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar {
|
||||
background-color: getVar("navbar-background-color");
|
||||
min-height: getVar("navbar-height");
|
||||
position: relative;
|
||||
z-index: getVar("navbar-z");
|
||||
|
||||
@each $name, $pair in $navbar-colors {
|
||||
$color: nth($pair, 1);
|
||||
$color-invert: nth($pair, 2);
|
||||
|
||||
&.is-#{$name} {
|
||||
background-color: $color;
|
||||
color: $color-invert;
|
||||
|
||||
.#{$class-prefix}navbar-brand {
|
||||
& > .#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
color: $color-invert;
|
||||
}
|
||||
|
||||
& > a.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active {
|
||||
background-color: bulmaDarken($color, 5%);
|
||||
color: $color-invert;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-link {
|
||||
&::after {
|
||||
border-color: $color-invert;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-burger {
|
||||
color: $color-invert;
|
||||
}
|
||||
|
||||
@include from($navbar-breakpoint) {
|
||||
.#{$class-prefix}navbar-start,
|
||||
.#{$class-prefix}navbar-end {
|
||||
& > .#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
color: $color-invert;
|
||||
}
|
||||
|
||||
& > a.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active {
|
||||
background-color: bulmaDarken($color, 5%);
|
||||
color: $color-invert;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-link {
|
||||
&::after {
|
||||
border-color: $color-invert;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-item.has-dropdown:focus
|
||||
.#{$class-prefix}navbar-link,
|
||||
.#{$class-prefix}navbar-item.has-dropdown:hover
|
||||
.#{$class-prefix}navbar-link,
|
||||
.#{$class-prefix}navbar-item.has-dropdown.is-active
|
||||
.#{$class-prefix}navbar-link {
|
||||
background-color: bulmaDarken($color, 5%);
|
||||
color: $color-invert;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-dropdown {
|
||||
a.#{$class-prefix}navbar-item {
|
||||
&.is-active {
|
||||
background-color: $color;
|
||||
color: $color-invert;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > .#{$class-prefix}container {
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
min-height: getVar("navbar-height");
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.has-shadow {
|
||||
box-shadow: getVar("navbar-box-shadow-size")
|
||||
getVar("navbar-box-shadow-color");
|
||||
}
|
||||
|
||||
&.is-fixed-bottom,
|
||||
&.is-fixed-top {
|
||||
@include navbar-fixed;
|
||||
}
|
||||
|
||||
&.is-fixed-bottom {
|
||||
bottom: 0;
|
||||
|
||||
&.has-shadow {
|
||||
box-shadow: getVar("navbar-bottom-box-shadow-size")
|
||||
getVar("navbar-box-shadow-color");
|
||||
}
|
||||
}
|
||||
|
||||
&.is-fixed-top {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
&.has-navbar-fixed-top {
|
||||
padding-top: getVar("navbar-height");
|
||||
}
|
||||
|
||||
&.has-navbar-fixed-bottom {
|
||||
padding-bottom: getVar("navbar-height");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-brand,
|
||||
.#{$class-prefix}navbar-tabs {
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
min-height: getVar("navbar-height");
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-brand {
|
||||
a.#{$class-prefix}navbar-item {
|
||||
&:focus,
|
||||
&:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-tabs {
|
||||
@include overflow-touch;
|
||||
|
||||
max-width: 100vw;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-burger {
|
||||
@extend %reset;
|
||||
|
||||
color: getVar("navbar-burger-color");
|
||||
|
||||
@include hamburger(getVar("navbar-height"));
|
||||
@include ltr-property("margin", auto, false);
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
color: getVar("navbar-item-color");
|
||||
display: block;
|
||||
line-height: 1.5;
|
||||
padding: 0.5rem 0.75rem;
|
||||
position: relative;
|
||||
|
||||
.#{$class-prefix}icon {
|
||||
&:only-child {
|
||||
margin-left: -0.25rem;
|
||||
margin-right: -0.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
cursor: pointer;
|
||||
|
||||
&:focus,
|
||||
&:focus-within,
|
||||
&:hover,
|
||||
&.is-active {
|
||||
background-color: getVar("navbar-item-hover-background-color");
|
||||
color: getVar("navbar-item-hover-color");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-item {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
|
||||
img {
|
||||
max-height: getVar("navbar-item-img-max-height");
|
||||
}
|
||||
|
||||
&.has-dropdown {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&.is-expanded {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
&.is-tab {
|
||||
border-bottom: 1px solid transparent;
|
||||
min-height: getVar("navbar-height");
|
||||
padding-bottom: calc(0.5rem - 1px);
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
background-color: getVar("navbar-tab-hover-background-color");
|
||||
border-bottom-color: getVar("navbar-tab-hover-border-bottom-color");
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background-color: getVar("navbar-tab-active-background-color");
|
||||
border-bottom-color: getVar("navbar-tab-active-border-bottom-color");
|
||||
border-bottom-style: getVar("navbar-tab-active-border-bottom-style");
|
||||
border-bottom-width: getVar("navbar-tab-active-border-bottom-width");
|
||||
color: getVar("navbar-tab-active-color");
|
||||
padding-bottom: calc(
|
||||
0.5rem - #{getVar("navbar-tab-active-border-bottom-width")}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-content {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-link:not(.is-arrowless) {
|
||||
@include ltr-property("padding", 2.5em);
|
||||
|
||||
&::after {
|
||||
@extend %arrow;
|
||||
border-color: getVar("navbar-dropdown-arrow");
|
||||
margin-top: -0.375em;
|
||||
@include ltr-position(1.125em);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-dropdown {
|
||||
font-size: 0.875rem;
|
||||
padding-bottom: 0.5rem;
|
||||
padding-top: 0.5rem;
|
||||
|
||||
.#{$class-prefix}navbar-item {
|
||||
padding-left: 1.5rem;
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-divider {
|
||||
background-color: getVar("navbar-divider-background-color");
|
||||
border: none;
|
||||
display: none;
|
||||
height: getVar("navbar-divider-height");
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
@include until($navbar-breakpoint) {
|
||||
.#{$class-prefix}navbar > .#{$class-prefix}container {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-brand,
|
||||
.#{$class-prefix}navbar-tabs {
|
||||
.#{$class-prefix}navbar-item {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-link {
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-menu {
|
||||
background-color: getVar("navbar-background-color");
|
||||
box-shadow: 0 8px 16px bulmaRgba(getVar("shadow-color-rgb"), 0.1);
|
||||
padding: 0.5rem 0;
|
||||
|
||||
&.is-active {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
// Fixed navbar
|
||||
.#{$class-prefix}navbar {
|
||||
&.is-fixed-bottom-touch,
|
||||
&.is-fixed-top-touch {
|
||||
@include navbar-fixed;
|
||||
}
|
||||
|
||||
&.is-fixed-bottom-touch {
|
||||
bottom: 0;
|
||||
|
||||
&.has-shadow {
|
||||
box-shadow: 0 -2px 3px bulmaRgba(getVar("shadow-color-rgb"), 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-fixed-top-touch {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&.is-fixed-top,
|
||||
&.is-fixed-top-touch {
|
||||
.#{$class-prefix}navbar-menu {
|
||||
@include overflow-touch;
|
||||
|
||||
max-height: calc(100vh - #{getVar("navbar-height")});
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
&.has-navbar-fixed-top-touch {
|
||||
padding-top: getVar("navbar-height");
|
||||
}
|
||||
|
||||
&.has-navbar-fixed-bottom-touch {
|
||||
padding-bottom: getVar("navbar-height");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include from($navbar-breakpoint) {
|
||||
.#{$class-prefix}navbar,
|
||||
.#{$class-prefix}navbar-menu,
|
||||
.#{$class-prefix}navbar-start,
|
||||
.#{$class-prefix}navbar-end {
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar {
|
||||
min-height: getVar("navbar-height");
|
||||
|
||||
&.is-spaced {
|
||||
padding: getVar("navbar-padding-vertical")
|
||||
getVar("navbar-padding-horizontal");
|
||||
|
||||
.#{$class-prefix}navbar-start,
|
||||
.#{$class-prefix}navbar-end {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
a.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
border-radius: getVar("radius");
|
||||
}
|
||||
}
|
||||
|
||||
&.is-transparent {
|
||||
a.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-item.has-dropdown {
|
||||
&.is-active,
|
||||
&.is-hoverable:focus,
|
||||
&.is-hoverable:focus-within,
|
||||
&.is-hoverable:hover {
|
||||
.#{$class-prefix}navbar-link {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-dropdown {
|
||||
a.#{$class-prefix}navbar-item {
|
||||
&:focus,
|
||||
&:hover {
|
||||
background-color: getVar(
|
||||
"navbar-dropdown-item-hover-background-color"
|
||||
);
|
||||
color: getVar("navbar-dropdown-item-hover-color");
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background-color: getVar(
|
||||
"navbar-dropdown-item-active-background-color"
|
||||
);
|
||||
color: getVar("navbar-dropdown-item-active-color");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-burger {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-item {
|
||||
&.has-dropdown {
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
&.has-dropdown-up {
|
||||
.#{$class-prefix}navbar-link::after {
|
||||
transform: rotate(135deg) translate(0.25em, -0.25em);
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-dropdown {
|
||||
border-bottom: getVar("navbar-dropdown-border-top");
|
||||
border-radius: getVar("navbar-dropdown-radius")
|
||||
getVar("navbar-dropdown-radius") 0 0;
|
||||
border-top: none;
|
||||
bottom: 100%;
|
||||
box-shadow: 0 -8px 8px bulmaRgba(getVar("shadow-color-rgb"), 0.1);
|
||||
top: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active,
|
||||
&.is-hoverable:focus,
|
||||
&.is-hoverable:focus-within,
|
||||
&.is-hoverable:hover {
|
||||
.#{$class-prefix}navbar-dropdown {
|
||||
display: block;
|
||||
|
||||
.#{$class-prefix}navbar.is-spaced &,
|
||||
&.is-boxed {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-menu {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-start {
|
||||
justify-content: flex-start;
|
||||
|
||||
@include ltr-property("margin", auto);
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-end {
|
||||
justify-content: flex-end;
|
||||
|
||||
@include ltr-property("margin", auto, false);
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-dropdown {
|
||||
background-color: getVar("navbar-dropdown-background-color");
|
||||
border-bottom-left-radius: getVar("navbar-dropdown-radius");
|
||||
border-bottom-right-radius: getVar("navbar-dropdown-radius");
|
||||
border-top: getVar("navbar-dropdown-border-top");
|
||||
box-shadow: 0 8px 8px bulmaRgba(getVar("shadow-color-rgb"), 0.1);
|
||||
display: none;
|
||||
font-size: 0.875rem;
|
||||
@include ltr-position(0, false);
|
||||
min-width: 100%;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
z-index: getVar("navbar-dropdown-z");
|
||||
|
||||
.#{$class-prefix}navbar-item {
|
||||
padding: 0.375rem 1rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
a.#{$class-prefix}navbar-item {
|
||||
@include ltr-property("padding", 3rem);
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
background-color: getVar("navbar-dropdown-item-hover-background-color");
|
||||
color: getVar("navbar-dropdown-item-hover-color");
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background-color: getVar(
|
||||
"navbar-dropdown-item-active-background-color"
|
||||
);
|
||||
color: getVar("navbar-dropdown-item-active-color");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar.is-spaced &,
|
||||
&.is-boxed {
|
||||
border-radius: getVar("navbar-dropdown-boxed-radius");
|
||||
border-top: none;
|
||||
box-shadow: getVar("navbar-dropdown-boxed-shadow");
|
||||
display: block;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
top: calc(100% + (#{getVar("navbar-dropdown-offset")}));
|
||||
transform: translateY(-5px);
|
||||
transition-duration: getVar("speed");
|
||||
transition-property: opacity, transform;
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-divider {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar > .#{$class-prefix}container,
|
||||
.#{$class-prefix}container > .#{$class-prefix}navbar {
|
||||
.#{$class-prefix}navbar-brand {
|
||||
@include ltr-property("margin", -0.75rem, false);
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-menu {
|
||||
@include ltr-property("margin", -0.75rem);
|
||||
}
|
||||
}
|
||||
|
||||
// Fixed navbar
|
||||
.#{$class-prefix}navbar {
|
||||
&.is-fixed-bottom-desktop,
|
||||
&.is-fixed-top-desktop {
|
||||
@include navbar-fixed;
|
||||
}
|
||||
|
||||
&.is-fixed-bottom-desktop {
|
||||
bottom: 0;
|
||||
|
||||
&.has-shadow {
|
||||
box-shadow: 0 -2px 3px bulmaRgba(getVar("shadow-color-rgb"), 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-fixed-top-desktop {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
&.has-navbar-fixed-top-desktop {
|
||||
padding-top: getVar("navbar-height");
|
||||
}
|
||||
|
||||
&.has-navbar-fixed-bottom-desktop {
|
||||
padding-bottom: getVar("navbar-height");
|
||||
}
|
||||
|
||||
&.has-spaced-navbar-fixed-top {
|
||||
padding-top: calc(
|
||||
#{getVar("navbar-height")} + calc(#{getVar("navbar-padding-vertical")} *
|
||||
2)
|
||||
);
|
||||
}
|
||||
|
||||
&.has-spaced-navbar-fixed-bottom {
|
||||
padding-bottom: calc(
|
||||
#{getVar("navbar-height")} + calc(#{getVar("navbar-padding-vertical")} *
|
||||
2)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Hover/Active states
|
||||
a.#{$class-prefix}navbar-item,
|
||||
.#{$class-prefix}navbar-link {
|
||||
&.is-active {
|
||||
color: getVar("navbar-item-active-color");
|
||||
}
|
||||
|
||||
&.is-active:not(:focus):not(:hover) {
|
||||
background-color: getVar("navbar-item-active-background-color");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}navbar-item.has-dropdown {
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active {
|
||||
.#{$class-prefix}navbar-link {
|
||||
background-color: getVar("navbar-item-hover-background-color");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Combination
|
||||
|
||||
.#{$class-prefix}hero {
|
||||
&.is-fullheight-with-navbar {
|
||||
min-height: calc(100vh - #{getVar("navbar-height")});
|
||||
}
|
||||
}
|
|
@ -1,167 +0,0 @@
|
|||
@import "../utilities/controls"
|
||||
@import "../utilities/mixins"
|
||||
|
||||
$pagination-color: $text-strong !default
|
||||
$pagination-border-color: $border !default
|
||||
$pagination-margin: -0.25rem !default
|
||||
$pagination-min-width: $control-height !default
|
||||
|
||||
$pagination-item-font-size: 1em !default
|
||||
$pagination-item-margin: 0.25rem !default
|
||||
$pagination-item-padding-left: 0.5em !default
|
||||
$pagination-item-padding-right: 0.5em !default
|
||||
|
||||
$pagination-nav-padding-left: 0.75em !default
|
||||
$pagination-nav-padding-right: 0.75em !default
|
||||
|
||||
$pagination-hover-color: $link-hover !default
|
||||
$pagination-hover-border-color: $link-hover-border !default
|
||||
|
||||
$pagination-focus-color: $link-focus !default
|
||||
$pagination-focus-border-color: $link-focus-border !default
|
||||
|
||||
$pagination-active-color: $link-active !default
|
||||
$pagination-active-border-color: $link-active-border !default
|
||||
|
||||
$pagination-disabled-color: $text-light !default
|
||||
$pagination-disabled-background-color: $border !default
|
||||
$pagination-disabled-border-color: $border !default
|
||||
|
||||
$pagination-current-color: $link-invert !default
|
||||
$pagination-current-background-color: $link !default
|
||||
$pagination-current-border-color: $link !default
|
||||
|
||||
$pagination-ellipsis-color: $grey-light !default
|
||||
|
||||
$pagination-shadow-inset: inset 0 1px 2px rgba($scheme-invert, 0.2) !default
|
||||
|
||||
.pagination
|
||||
@extend %block
|
||||
font-size: $size-normal
|
||||
margin: $pagination-margin
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
&.is-large
|
||||
font-size: $size-large
|
||||
&.is-rounded
|
||||
.pagination-previous,
|
||||
.pagination-next
|
||||
padding-left: 1em
|
||||
padding-right: 1em
|
||||
border-radius: $radius-rounded
|
||||
.pagination-link
|
||||
border-radius: $radius-rounded
|
||||
|
||||
.pagination,
|
||||
.pagination-list
|
||||
align-items: center
|
||||
display: flex
|
||||
justify-content: center
|
||||
text-align: center
|
||||
|
||||
.pagination-previous,
|
||||
.pagination-next,
|
||||
.pagination-link,
|
||||
.pagination-ellipsis
|
||||
@extend %control
|
||||
@extend %unselectable
|
||||
font-size: $pagination-item-font-size
|
||||
justify-content: center
|
||||
margin: $pagination-item-margin
|
||||
padding-left: $pagination-item-padding-left
|
||||
padding-right: $pagination-item-padding-right
|
||||
text-align: center
|
||||
|
||||
.pagination-previous,
|
||||
.pagination-next,
|
||||
.pagination-link
|
||||
border-color: $pagination-border-color
|
||||
color: $pagination-color
|
||||
min-width: $pagination-min-width
|
||||
&:hover
|
||||
border-color: $pagination-hover-border-color
|
||||
color: $pagination-hover-color
|
||||
&:focus
|
||||
border-color: $pagination-focus-border-color
|
||||
&:active
|
||||
box-shadow: $pagination-shadow-inset
|
||||
&[disabled],
|
||||
&.is-disabled
|
||||
background-color: $pagination-disabled-background-color
|
||||
border-color: $pagination-disabled-border-color
|
||||
box-shadow: none
|
||||
color: $pagination-disabled-color
|
||||
opacity: 0.5
|
||||
|
||||
.pagination-previous,
|
||||
.pagination-next
|
||||
padding-left: $pagination-nav-padding-left
|
||||
padding-right: $pagination-nav-padding-right
|
||||
white-space: nowrap
|
||||
|
||||
.pagination-link
|
||||
&.is-current
|
||||
background-color: $pagination-current-background-color
|
||||
border-color: $pagination-current-border-color
|
||||
color: $pagination-current-color
|
||||
|
||||
.pagination-ellipsis
|
||||
color: $pagination-ellipsis-color
|
||||
pointer-events: none
|
||||
|
||||
.pagination-list
|
||||
flex-wrap: wrap
|
||||
li
|
||||
list-style: none
|
||||
|
||||
+mobile
|
||||
.pagination
|
||||
flex-wrap: wrap
|
||||
.pagination-previous,
|
||||
.pagination-next
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
.pagination-list
|
||||
li
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
|
||||
+tablet
|
||||
.pagination-list
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
justify-content: flex-start
|
||||
order: 1
|
||||
.pagination-previous,
|
||||
.pagination-next,
|
||||
.pagination-link,
|
||||
.pagination-ellipsis
|
||||
margin-bottom: 0
|
||||
margin-top: 0
|
||||
.pagination-previous
|
||||
order: 2
|
||||
.pagination-next
|
||||
order: 3
|
||||
.pagination
|
||||
justify-content: space-between
|
||||
margin-bottom: 0
|
||||
margin-top: 0
|
||||
&.is-centered
|
||||
.pagination-previous
|
||||
order: 1
|
||||
.pagination-list
|
||||
justify-content: center
|
||||
order: 2
|
||||
.pagination-next
|
||||
order: 3
|
||||
&.is-right
|
||||
.pagination-previous
|
||||
order: 1
|
||||
.pagination-next
|
||||
order: 2
|
||||
.pagination-list
|
||||
justify-content: flex-end
|
||||
order: 3
|
261
sass/components/pagination.scss
Normal file
261
sass/components/pagination.scss
Normal file
|
@ -0,0 +1,261 @@
|
|||
@import "../utilities/controls";
|
||||
@import "../utilities/mixins";
|
||||
|
||||
$pagination-color: getVar("text-strong") !default;
|
||||
$pagination-border-color: getVar("border") !default;
|
||||
$pagination-margin: -0.25rem !default;
|
||||
$pagination-min-width: $control-height !default; // TODO
|
||||
|
||||
$pagination-item-font-size: 1em !default;
|
||||
$pagination-item-margin: 0.25rem !default;
|
||||
$pagination-item-padding-left: 0.5em !default;
|
||||
$pagination-item-padding-right: 0.5em !default;
|
||||
|
||||
$pagination-nav-padding-left: 0.75em !default;
|
||||
$pagination-nav-padding-right: 0.75em !default;
|
||||
|
||||
$pagination-hover-color: getVar("link-hover") !default;
|
||||
$pagination-hover-border-color: getVar("link-hover-border") !default;
|
||||
|
||||
$pagination-focus-color: getVar("link-focus") !default;
|
||||
$pagination-focus-border-color: getVar("link-focus-border") !default;
|
||||
|
||||
$pagination-active-color: getVar("link-active") !default;
|
||||
$pagination-active-border-color: getVar("link-active-border") !default;
|
||||
|
||||
$pagination-disabled-color: getVar("text-light") !default;
|
||||
$pagination-disabled-background-color: getVar("border") !default;
|
||||
$pagination-disabled-border-color: getVar("border") !default;
|
||||
|
||||
$pagination-current-color: getVar("link-invert") !default;
|
||||
$pagination-current-background-color: getVar("link") !default;
|
||||
$pagination-current-border-color: getVar("link") !default;
|
||||
|
||||
$pagination-ellipsis-color: getVar("grey-light") !default;
|
||||
|
||||
$pagination-shadow-inset: inset 0 1px 2px rgba(getVar("shadow-color-rgb"), 0.2) !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
pagination-color: #{$pagination-color},
|
||||
pagination-border-color: #{$pagination-border-color},
|
||||
pagination-margin: #{$pagination-margin},
|
||||
pagination-min-width: #{$pagination-min-width},
|
||||
pagination-item-font-size: #{$pagination-item-font-size},
|
||||
pagination-item-margin: #{$pagination-item-margin},
|
||||
pagination-item-padding-left: #{$pagination-item-padding-left},
|
||||
pagination-item-padding-right: #{$pagination-item-padding-right},
|
||||
pagination-nav-padding-left: #{$pagination-nav-padding-left},
|
||||
pagination-nav-padding-right: #{$pagination-nav-padding-right},
|
||||
pagination-hover-color: #{$pagination-hover-color},
|
||||
pagination-hover-border-color: #{$pagination-hover-border-color},
|
||||
pagination-focus-color: #{$pagination-focus-color},
|
||||
pagination-focus-border-color: #{$pagination-focus-border-color},
|
||||
pagination-active-color: #{$pagination-active-color},
|
||||
pagination-active-border-color: #{$pagination-active-border-color},
|
||||
pagination-disabled-color: #{$pagination-disabled-color},
|
||||
pagination-disabled-background-color: #{$pagination-disabled-background-color},
|
||||
pagination-disabled-border-color: #{$pagination-disabled-border-color},
|
||||
pagination-current-color: #{$pagination-current-color},
|
||||
pagination-current-background-color: #{$pagination-current-background-color},
|
||||
pagination-current-border-color: #{$pagination-current-border-color},
|
||||
pagination-ellipsis-color: #{$pagination-ellipsis-color},
|
||||
pagination-shadow-inset: #{$pagination-shadow-inset},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination {
|
||||
@extend %block;
|
||||
|
||||
font-size: getVar("size-normal");
|
||||
margin: getVar("pagination-margin");
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: getVar("size-large");
|
||||
}
|
||||
|
||||
&.is-rounded {
|
||||
.#{$class-prefix}pagination-previous,
|
||||
.#{$class-prefix}pagination-next {
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
border-radius: getVar("radius-rounded");
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-link {
|
||||
border-radius: getVar("radius-rounded");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination,
|
||||
.#{$class-prefix}pagination-list {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-previous,
|
||||
.#{$class-prefix}pagination-next,
|
||||
.#{$class-prefix}pagination-link,
|
||||
.#{$class-prefix}pagination-ellipsis {
|
||||
@extend %control;
|
||||
@extend %unselectable;
|
||||
|
||||
font-size: getVar("pagination-item-font-size");
|
||||
justify-content: center;
|
||||
margin: getVar("pagination-item-margin");
|
||||
padding-left: getVar("pagination-item-padding-left");
|
||||
padding-right: getVar("pagination-item-padding-right");
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-previous,
|
||||
.#{$class-prefix}pagination-next,
|
||||
.#{$class-prefix}pagination-link {
|
||||
border-color: getVar("pagination-border-color");
|
||||
color: getVar("pagination-color");
|
||||
min-width: getVar("pagination-min-width");
|
||||
|
||||
&:hover {
|
||||
border-color: getVar("pagination-hover-border-color");
|
||||
color: getVar("pagination-hover-color");
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: getVar("pagination-focus-border-color");
|
||||
}
|
||||
|
||||
&:active {
|
||||
box-shadow: getVar("pagination-shadow-inset");
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
&.is-disabled {
|
||||
background-color: getVar("pagination-disabled-background-color");
|
||||
border-color: getVar("pagination-disabled-border-color");
|
||||
box-shadow: none;
|
||||
color: getVar("pagination-disabled-color");
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-previous,
|
||||
.#{$class-prefix}pagination-next {
|
||||
padding-left: getVar("pagination-nav-padding-left");
|
||||
padding-right: getVar("pagination-nav-padding-right");
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-link {
|
||||
&.is-current {
|
||||
background-color: getVar("pagination-current-background-color");
|
||||
border-color: getVar("pagination-current-border-color");
|
||||
color: getVar("pagination-current-color");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-ellipsis {
|
||||
color: getVar("pagination-ellipsis-color");
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-list {
|
||||
flex-wrap: wrap;
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
@include mobile {
|
||||
.#{$class-prefix}pagination {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-previous,
|
||||
.#{$class-prefix}pagination-next {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-list {
|
||||
li {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include tablet {
|
||||
.#{$class-prefix}pagination-list {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
justify-content: flex-start;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-previous,
|
||||
.#{$class-prefix}pagination-next,
|
||||
.#{$class-prefix}pagination-link,
|
||||
.#{$class-prefix}pagination-ellipsis {
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-previous {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-next {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination {
|
||||
justify-content: space-between;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
|
||||
&.is-centered {
|
||||
.#{$class-prefix}pagination-previous {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-list {
|
||||
justify-content: center;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-next {
|
||||
order: 3;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
.#{$class-prefix}pagination-previous {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-next {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.#{$class-prefix}pagination-list {
|
||||
justify-content: flex-end;
|
||||
order: 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$panel-margin: $block-spacing !default
|
||||
$panel-item-border: 1px solid $border-light !default
|
||||
$panel-radius: $radius-large !default
|
||||
$panel-shadow: $shadow !default
|
||||
|
||||
$panel-heading-background-color: $border-light !default
|
||||
$panel-heading-color: $text-strong !default
|
||||
$panel-heading-line-height: 1.25 !default
|
||||
$panel-heading-padding: 0.75em 1em !default
|
||||
$panel-heading-radius: $radius !default
|
||||
$panel-heading-size: 1.25em !default
|
||||
$panel-heading-weight: $weight-bold !default
|
||||
|
||||
$panel-tabs-font-size: 0.875em !default
|
||||
$panel-tab-border-bottom: 1px solid $border !default
|
||||
$panel-tab-active-border-bottom-color: $link-active-border !default
|
||||
$panel-tab-active-color: $link-active !default
|
||||
|
||||
$panel-list-item-color: $text !default
|
||||
$panel-list-item-hover-color: $link !default
|
||||
|
||||
$panel-block-color: $text-strong !default
|
||||
$panel-block-hover-background-color: $background !default
|
||||
$panel-block-active-border-left-color: $link !default
|
||||
$panel-block-active-color: $link-active !default
|
||||
$panel-block-active-icon-color: $link !default
|
||||
|
||||
$panel-icon-color: $text-light !default
|
||||
$panel-colors: $colors !default
|
||||
|
||||
.panel
|
||||
border-radius: $panel-radius
|
||||
box-shadow: $panel-shadow
|
||||
font-size: $size-normal
|
||||
&:not(:last-child)
|
||||
margin-bottom: $panel-margin
|
||||
// Colors
|
||||
@each $name, $components in $panel-colors
|
||||
$color: nth($components, 1)
|
||||
$color-invert: nth($components, 2)
|
||||
&.is-#{$name}
|
||||
.panel-heading
|
||||
background-color: $color
|
||||
color: $color-invert
|
||||
.panel-tabs a.is-active
|
||||
border-bottom-color: $color
|
||||
.panel-block.is-active .panel-icon
|
||||
color: $color
|
||||
|
||||
.panel-tabs,
|
||||
.panel-block
|
||||
&:not(:last-child)
|
||||
border-bottom: $panel-item-border
|
||||
|
||||
.panel-heading
|
||||
background-color: $panel-heading-background-color
|
||||
border-radius: $panel-radius $panel-radius 0 0
|
||||
color: $panel-heading-color
|
||||
font-size: $panel-heading-size
|
||||
font-weight: $panel-heading-weight
|
||||
line-height: $panel-heading-line-height
|
||||
padding: $panel-heading-padding
|
||||
|
||||
.panel-tabs
|
||||
align-items: flex-end
|
||||
display: flex
|
||||
font-size: $panel-tabs-font-size
|
||||
justify-content: center
|
||||
a
|
||||
border-bottom: $panel-tab-border-bottom
|
||||
margin-bottom: -1px
|
||||
padding: 0.5em
|
||||
// Modifiers
|
||||
&.is-active
|
||||
border-bottom-color: $panel-tab-active-border-bottom-color
|
||||
color: $panel-tab-active-color
|
||||
|
||||
.panel-list
|
||||
a
|
||||
color: $panel-list-item-color
|
||||
&:hover
|
||||
color: $panel-list-item-hover-color
|
||||
|
||||
.panel-block
|
||||
align-items: center
|
||||
color: $panel-block-color
|
||||
display: flex
|
||||
justify-content: flex-start
|
||||
padding: 0.5em 0.75em
|
||||
input[type="checkbox"]
|
||||
+ltr-property("margin", 0.75em)
|
||||
& > .control
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
width: 100%
|
||||
&.is-wrapped
|
||||
flex-wrap: wrap
|
||||
&.is-active
|
||||
border-left-color: $panel-block-active-border-left-color
|
||||
color: $panel-block-active-color
|
||||
.panel-icon
|
||||
color: $panel-block-active-icon-color
|
||||
&:last-child
|
||||
border-bottom-left-radius: $panel-radius
|
||||
border-bottom-right-radius: $panel-radius
|
||||
|
||||
a.panel-block,
|
||||
label.panel-block
|
||||
cursor: pointer
|
||||
&:hover
|
||||
background-color: $panel-block-hover-background-color
|
||||
|
||||
.panel-icon
|
||||
+fa(14px, 1em)
|
||||
color: $panel-icon-color
|
||||
+ltr-property("margin", 0.75em)
|
||||
.fa
|
||||
font-size: inherit
|
||||
line-height: inherit
|
196
sass/components/panel.scss
Normal file
196
sass/components/panel.scss
Normal file
|
@ -0,0 +1,196 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$panel-margin: getVar("block-spacing") !default;
|
||||
$panel-item-border: 1px solid getVar("border-light") !default;
|
||||
$panel-radius: getVar("radius-large") !default;
|
||||
$panel-shadow: getVar("shadow") !default;
|
||||
|
||||
$panel-heading-background-color: getVar("border-light") !default;
|
||||
$panel-heading-color: getVar("text-strong") !default;
|
||||
$panel-heading-line-height: 1.25 !default;
|
||||
$panel-heading-padding: 0.75em 1em !default;
|
||||
$panel-heading-radius: getVar("radius") !default;
|
||||
$panel-heading-size: 1.25em !default;
|
||||
$panel-heading-weight: getVar("weight-bold") !default;
|
||||
|
||||
$panel-tabs-font-size: 0.875em !default;
|
||||
$panel-tab-border-bottom: 1px solid getVar("border") !default;
|
||||
$panel-tab-active-border-bottom-color: getVar("link-active-border") !default;
|
||||
$panel-tab-active-color: getVar("link-active") !default;
|
||||
|
||||
$panel-list-item-color: getVar("text") !default;
|
||||
$panel-list-item-hover-color: getVar("link") !default;
|
||||
|
||||
$panel-block-color: getVar("text-strong") !default;
|
||||
$panel-block-hover-background-color: getVar("background") !default;
|
||||
$panel-block-active-border-left-color: getVar("link") !default;
|
||||
$panel-block-active-color: getVar("link-active") !default;
|
||||
$panel-block-active-icon-color: getVar("link") !default;
|
||||
|
||||
$panel-icon-color: getVar("text-light") !default;
|
||||
$panel-colors: $colors !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
panel-margin: #{$panel-margin},
|
||||
panel-item-border: #{$panel-item-border},
|
||||
panel-radius: #{$panel-radius},
|
||||
panel-shadow: #{$panel-shadow},
|
||||
panel-heading-background-color: #{$panel-heading-background-color},
|
||||
panel-heading-color: #{$panel-heading-color},
|
||||
panel-heading-line-height: #{$panel-heading-line-height},
|
||||
panel-heading-padding: #{$panel-heading-padding},
|
||||
panel-heading-radius: #{$panel-heading-radius},
|
||||
panel-heading-size: #{$panel-heading-size},
|
||||
panel-heading-weight: #{$panel-heading-weight},
|
||||
panel-tabs-font-size: #{$panel-tabs-font-size},
|
||||
panel-tab-border-bottom: #{$panel-tab-border-bottom},
|
||||
panel-tab-active-border-bottom-color: #{$panel-tab-active-border-bottom-color},
|
||||
panel-tab-active-color: #{$panel-tab-active-color},
|
||||
panel-list-item-color: #{$panel-list-item-color},
|
||||
panel-list-item-hover-color: #{$panel-list-item-hover-color},
|
||||
panel-block-color: #{$panel-block-color},
|
||||
panel-block-hover-background-color: #{$panel-block-hover-background-color},
|
||||
panel-block-active-border-left-color: #{$panel-block-active-border-left-color},
|
||||
panel-block-active-color: #{$panel-block-active-color},
|
||||
panel-block-active-icon-color: #{$panel-block-active-icon-color},
|
||||
panel-icon-color: #{$panel-icon-color},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel {
|
||||
border-radius: getVar("panel-radius");
|
||||
box-shadow: getVar("panel-shadow");
|
||||
font-size: getVar("size-normal");
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: getVar("panel-margin");
|
||||
}
|
||||
|
||||
// Colors
|
||||
@each $name, $components in $panel-colors {
|
||||
$color: nth($components, 1);
|
||||
$color-invert: nth($components, 2);
|
||||
|
||||
&.is-#{$name} {
|
||||
.#{$class-prefix}panel-heading {
|
||||
background-color: $color;
|
||||
color: $color-invert;
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-tabs a.is-active {
|
||||
border-bottom-color: $color;
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-block.is-active .#{$class-prefix}panel-icon {
|
||||
color: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-tabs,
|
||||
.#{$class-prefix}panel-block {
|
||||
&:not(:last-child) {
|
||||
border-bottom: getVar("panel-item-border");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-heading {
|
||||
background-color: getVar("panel-heading-background-color");
|
||||
border-radius: $panel-radius $panel-radius 0 0;
|
||||
color: getVar("panel-heading-color");
|
||||
font-size: getVar("panel-heading-size");
|
||||
font-weight: getVar("panel-heading-weight");
|
||||
line-height: getVar("panel-heading-line-height");
|
||||
padding: getVar("panel-heading-padding");
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-tabs {
|
||||
align-items: flex-end;
|
||||
display: flex;
|
||||
font-size: getVar("panel-tabs-font-size");
|
||||
justify-content: center;
|
||||
|
||||
a {
|
||||
border-bottom: getVar("panel-tab-border-bottom");
|
||||
margin-bottom: -1px;
|
||||
padding: 0.5em;
|
||||
|
||||
// Modifiers
|
||||
&.is-active {
|
||||
border-bottom-color: getVar("panel-tab-active-border-bottom-color");
|
||||
color: getVar("panel-tab-active-color");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-list {
|
||||
a {
|
||||
color: getVar("panel-list-item-color");
|
||||
|
||||
&:hover {
|
||||
color: getVar("panel-list-item-hover-color");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-block {
|
||||
align-items: center;
|
||||
color: getVar("panel-block-color");
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
padding: 0.5em 0.75em;
|
||||
|
||||
input[type="checkbox"] {
|
||||
@include ltr-property("margin", 0.75em);
|
||||
}
|
||||
|
||||
& > .#{$class-prefix}control {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.is-wrapped {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
border-left-color: getVar("panel-block-active-border-left-color");
|
||||
color: getVar("panel-block-active-color");
|
||||
|
||||
.#{$class-prefix}panel-icon {
|
||||
color: getVar("panel-block-active-icon-color");
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-left-radius: getVar("panel-radius");
|
||||
border-bottom-right-radius: getVar("panel-radius");
|
||||
}
|
||||
}
|
||||
|
||||
a.#{$class-prefix}panel-block,
|
||||
label.#{$class-prefix}panel-block {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: getVar("panel-block-hover-background-color");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}panel-icon {
|
||||
@include fa(14px, 1em);
|
||||
|
||||
color: getVar("panel-icon-color");
|
||||
|
||||
@include ltr-property("margin", 0.75em);
|
||||
|
||||
.fa {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
}
|
|
@ -1,176 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$tabs-border-bottom-color: $border !default
|
||||
$tabs-border-bottom-style: solid !default
|
||||
$tabs-border-bottom-width: 1px !default
|
||||
$tabs-link-color: $text !default
|
||||
$tabs-link-hover-border-bottom-color: $text-strong !default
|
||||
$tabs-link-hover-color: $text-strong !default
|
||||
$tabs-link-active-border-bottom-color: $link !default
|
||||
$tabs-link-active-color: $link !default
|
||||
$tabs-link-padding: 0.5em 1em !default
|
||||
|
||||
$tabs-boxed-link-radius: $radius !default
|
||||
$tabs-boxed-link-hover-background-color: $background !default
|
||||
$tabs-boxed-link-hover-border-bottom-color: $border !default
|
||||
|
||||
$tabs-boxed-link-active-background-color: $scheme-main !default
|
||||
$tabs-boxed-link-active-border-color: $border !default
|
||||
$tabs-boxed-link-active-border-bottom-color: transparent !default
|
||||
|
||||
$tabs-toggle-link-border-color: $border !default
|
||||
$tabs-toggle-link-border-style: solid !default
|
||||
$tabs-toggle-link-border-width: 1px !default
|
||||
$tabs-toggle-link-hover-background-color: $background !default
|
||||
$tabs-toggle-link-hover-border-color: $border-hover !default
|
||||
$tabs-toggle-link-radius: $radius !default
|
||||
$tabs-toggle-link-active-background-color: $link !default
|
||||
$tabs-toggle-link-active-border-color: $link !default
|
||||
$tabs-toggle-link-active-color: $link-invert !default
|
||||
|
||||
.tabs
|
||||
@extend %block
|
||||
+overflow-touch
|
||||
@extend %unselectable
|
||||
align-items: stretch
|
||||
display: flex
|
||||
font-size: $size-normal
|
||||
justify-content: space-between
|
||||
overflow: hidden
|
||||
overflow-x: auto
|
||||
white-space: nowrap
|
||||
a
|
||||
align-items: center
|
||||
border-bottom-color: $tabs-border-bottom-color
|
||||
border-bottom-style: $tabs-border-bottom-style
|
||||
border-bottom-width: $tabs-border-bottom-width
|
||||
color: $tabs-link-color
|
||||
display: flex
|
||||
justify-content: center
|
||||
margin-bottom: -#{$tabs-border-bottom-width}
|
||||
padding: $tabs-link-padding
|
||||
vertical-align: top
|
||||
&:hover
|
||||
border-bottom-color: $tabs-link-hover-border-bottom-color
|
||||
color: $tabs-link-hover-color
|
||||
li
|
||||
display: block
|
||||
&.is-active
|
||||
a
|
||||
border-bottom-color: $tabs-link-active-border-bottom-color
|
||||
color: $tabs-link-active-color
|
||||
ul
|
||||
align-items: center
|
||||
border-bottom-color: $tabs-border-bottom-color
|
||||
border-bottom-style: $tabs-border-bottom-style
|
||||
border-bottom-width: $tabs-border-bottom-width
|
||||
display: flex
|
||||
flex-grow: 1
|
||||
flex-shrink: 0
|
||||
justify-content: flex-start
|
||||
&.is-left
|
||||
padding-right: 0.75em
|
||||
&.is-center
|
||||
flex: none
|
||||
justify-content: center
|
||||
padding-left: 0.75em
|
||||
padding-right: 0.75em
|
||||
&.is-right
|
||||
justify-content: flex-end
|
||||
padding-left: 0.75em
|
||||
.icon
|
||||
&:first-child
|
||||
+ltr-property("margin", 0.5em)
|
||||
&:last-child
|
||||
+ltr-property("margin", 0.5em, false)
|
||||
// Alignment
|
||||
&.is-centered
|
||||
ul
|
||||
justify-content: center
|
||||
&.is-right
|
||||
ul
|
||||
justify-content: flex-end
|
||||
// Styles
|
||||
&.is-boxed
|
||||
a
|
||||
border: 1px solid transparent
|
||||
+ltr
|
||||
border-radius: $tabs-boxed-link-radius $tabs-boxed-link-radius 0 0
|
||||
+rtl
|
||||
border-radius: 0 0 $tabs-boxed-link-radius $tabs-boxed-link-radius
|
||||
&:hover
|
||||
background-color: $tabs-boxed-link-hover-background-color
|
||||
border-bottom-color: $tabs-boxed-link-hover-border-bottom-color
|
||||
li
|
||||
&.is-active
|
||||
a
|
||||
background-color: $tabs-boxed-link-active-background-color
|
||||
border-color: $tabs-boxed-link-active-border-color
|
||||
border-bottom-color: $tabs-boxed-link-active-border-bottom-color !important
|
||||
&.is-fullwidth
|
||||
li
|
||||
flex-grow: 1
|
||||
flex-shrink: 0
|
||||
&.is-toggle
|
||||
a
|
||||
border-color: $tabs-toggle-link-border-color
|
||||
border-style: $tabs-toggle-link-border-style
|
||||
border-width: $tabs-toggle-link-border-width
|
||||
margin-bottom: 0
|
||||
position: relative
|
||||
&:hover
|
||||
background-color: $tabs-toggle-link-hover-background-color
|
||||
border-color: $tabs-toggle-link-hover-border-color
|
||||
z-index: 2
|
||||
li
|
||||
& + li
|
||||
+ltr-property("margin", -#{$tabs-toggle-link-border-width}, false)
|
||||
&:first-child a
|
||||
+ltr
|
||||
border-top-left-radius: $tabs-toggle-link-radius
|
||||
border-bottom-left-radius: $tabs-toggle-link-radius
|
||||
+rtl
|
||||
border-top-right-radius: $tabs-toggle-link-radius
|
||||
border-bottom-right-radius: $tabs-toggle-link-radius
|
||||
&:last-child a
|
||||
+ltr
|
||||
border-top-right-radius: $tabs-toggle-link-radius
|
||||
border-bottom-right-radius: $tabs-toggle-link-radius
|
||||
+rtl
|
||||
border-top-left-radius: $tabs-toggle-link-radius
|
||||
border-bottom-left-radius: $tabs-toggle-link-radius
|
||||
&.is-active
|
||||
a
|
||||
background-color: $tabs-toggle-link-active-background-color
|
||||
border-color: $tabs-toggle-link-active-border-color
|
||||
color: $tabs-toggle-link-active-color
|
||||
z-index: 1
|
||||
ul
|
||||
border-bottom: none
|
||||
&.is-toggle-rounded
|
||||
li
|
||||
&:first-child a
|
||||
+ltr
|
||||
border-bottom-left-radius: $radius-rounded
|
||||
border-top-left-radius: $radius-rounded
|
||||
padding-left: 1.25em
|
||||
+rtl
|
||||
border-bottom-right-radius: $radius-rounded
|
||||
border-top-right-radius: $radius-rounded
|
||||
padding-right: 1.25em
|
||||
&:last-child a
|
||||
+ltr
|
||||
border-bottom-right-radius: $radius-rounded
|
||||
border-top-right-radius: $radius-rounded
|
||||
padding-right: 1.25em
|
||||
+rtl
|
||||
border-bottom-left-radius: $radius-rounded
|
||||
border-top-left-radius: $radius-rounded
|
||||
padding-left: 1.25em
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
&.is-large
|
||||
font-size: $size-large
|
304
sass/components/tabs.scss
Normal file
304
sass/components/tabs.scss
Normal file
|
@ -0,0 +1,304 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$tabs-border-bottom-color: getVar("border") !default;
|
||||
$tabs-border-bottom-style: solid !default;
|
||||
$tabs-border-bottom-width: 1px !default;
|
||||
$tabs-link-color: getVar("text") !default;
|
||||
$tabs-link-hover-border-bottom-color: getVar("text-strong") !default;
|
||||
$tabs-link-hover-color: getVar("text-strong") !default;
|
||||
$tabs-link-active-border-bottom-color: getVar("link") !default;
|
||||
$tabs-link-active-color: getVar("link") !default;
|
||||
$tabs-link-padding: 0.5em 1em !default;
|
||||
|
||||
$tabs-boxed-link-radius: getVar("radius") !default;
|
||||
$tabs-boxed-link-hover-background-color: getVar("background") !default;
|
||||
$tabs-boxed-link-hover-border-bottom-color: getVar("border") !default;
|
||||
|
||||
$tabs-boxed-link-active-background-color: getVar("scheme-main") !default;
|
||||
$tabs-boxed-link-active-border-color: getVar("border") !default;
|
||||
$tabs-boxed-link-active-border-bottom-color: transparent !default;
|
||||
|
||||
$tabs-toggle-link-border-color: getVar("border") !default;
|
||||
$tabs-toggle-link-border-style: solid !default;
|
||||
$tabs-toggle-link-border-width: 1px !default;
|
||||
$tabs-toggle-link-hover-background-color: getVar("background") !default;
|
||||
$tabs-toggle-link-hover-border-color: getVar("border-hover") !default;
|
||||
$tabs-toggle-link-radius: getVar("radius") !default;
|
||||
$tabs-toggle-link-active-background-color: getVar("link") !default;
|
||||
$tabs-toggle-link-active-border-color: getVar("link") !default;
|
||||
$tabs-toggle-link-active-color: getVar("link-invert") !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
tabs-border-bottom-color: #{$tabs-border-bottom-color},
|
||||
tabs-border-bottom-style: #{$tabs-border-bottom-style},
|
||||
tabs-border-bottom-width: #{$tabs-border-bottom-width},
|
||||
tabs-link-color: #{$tabs-link-color},
|
||||
tabs-link-hover-border-bottom-color: #{$tabs-link-hover-border-bottom-color},
|
||||
tabs-link-hover-color: #{$tabs-link-hover-color},
|
||||
tabs-link-active-border-bottom-color: #{$tabs-link-active-border-bottom-color},
|
||||
tabs-link-active-color: #{$tabs-link-active-color},
|
||||
tabs-link-padding: #{$tabs-link-padding},
|
||||
tabs-boxed-link-radius: #{$tabs-boxed-link-radius},
|
||||
tabs-boxed-link-hover-background-color: #{$tabs-boxed-link-hover-background-color},
|
||||
tabs-boxed-link-hover-border-bottom-color: #{$tabs-boxed-link-hover-border-bottom-color},
|
||||
tabs-boxed-link-active-background-color: #{$tabs-boxed-link-active-background-color},
|
||||
tabs-boxed-link-active-border-color: #{$tabs-boxed-link-active-border-color},
|
||||
tabs-boxed-link-active-border-bottom-color: #{$tabs-boxed-link-active-border-bottom-color},
|
||||
tabs-toggle-link-border-color: #{$tabs-toggle-link-border-color},
|
||||
tabs-toggle-link-border-style: #{$tabs-toggle-link-border-style},
|
||||
tabs-toggle-link-border-width: #{$tabs-toggle-link-border-width},
|
||||
tabs-toggle-link-hover-background-color: #{$tabs-toggle-link-hover-background-color},
|
||||
tabs-toggle-link-hover-border-color: #{$tabs-toggle-link-hover-border-color},
|
||||
tabs-toggle-link-radius: #{$tabs-toggle-link-radius},
|
||||
tabs-toggle-link-active-background-color: #{$tabs-toggle-link-active-background-color},
|
||||
tabs-toggle-link-active-border-color: #{$tabs-toggle-link-active-border-color},
|
||||
tabs-toggle-link-active-color: #{$tabs-toggle-link-active-color},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}tabs {
|
||||
@extend %block;
|
||||
@include overflow-touch;
|
||||
@extend %unselectable;
|
||||
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
font-size: getVar("size-normal");
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
|
||||
a {
|
||||
align-items: center;
|
||||
border-bottom-color: getVar("tabs-border-bottom-color");
|
||||
border-bottom-style: getVar("tabs-border-bottom-style");
|
||||
border-bottom-width: getVar("tabs-border-bottom-width");
|
||||
color: getVar("tabs-link-color");
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: calc(-1 * #{getVar("tabs-border-bottom-width")});
|
||||
padding: getVar("tabs-link-padding");
|
||||
vertical-align: top;
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: getVar("tabs-link-hover-border-bottom-color");
|
||||
color: getVar("tabs-link-hover-color");
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
|
||||
&.is-active {
|
||||
a {
|
||||
border-bottom-color: getVar("tabs-link-active-border-bottom-color");
|
||||
color: getVar("tabs-link-active-color");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
align-items: center;
|
||||
border-bottom-color: getVar("tabs-border-bottom-color");
|
||||
border-bottom-style: getVar("tabs-border-bottom-style");
|
||||
border-bottom-width: getVar("tabs-border-bottom-width");
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 0;
|
||||
justify-content: flex-start;
|
||||
|
||||
&.is-left {
|
||||
padding-right: 0.75em;
|
||||
}
|
||||
|
||||
&.is-center {
|
||||
flex: none;
|
||||
justify-content: center;
|
||||
padding-left: 0.75em;
|
||||
padding-right: 0.75em;
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
justify-content: flex-end;
|
||||
padding-left: 0.75em;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}icon {
|
||||
&:first-child {
|
||||
@include ltr-property("margin", 0.5em);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include ltr-property("margin", 0.5em, false);
|
||||
}
|
||||
}
|
||||
|
||||
// Alignment
|
||||
&.is-centered {
|
||||
ul {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
ul {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
// Styles
|
||||
&.is-boxed {
|
||||
a {
|
||||
border: 1px solid transparent;
|
||||
|
||||
@include ltr {
|
||||
border-radius: getVar("tabs-boxed-link-radius")
|
||||
getVar("tabs-boxed-link-radius") 0 0;
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
border-radius: 0 0 getVar("tabs-boxed-link-radius")
|
||||
getVar("tabs-boxed-link-radius");
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: getVar("tabs-boxed-link-hover-background-color");
|
||||
border-bottom-color: getVar(
|
||||
"tabs-boxed-link-hover-border-bottom-color"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
&.is-active {
|
||||
a {
|
||||
background-color: getVar("tabs-boxed-link-active-background-color");
|
||||
border-color: getVar("tabs-boxed-link-active-border-color");
|
||||
border-bottom-color: getVar(
|
||||
"tabs-boxed-link-active-border-bottom-color"
|
||||
) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-fullwidth {
|
||||
li {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-toggle {
|
||||
a {
|
||||
border-color: getVar("tabs-toggle-link-border-color");
|
||||
border-style: getVar("tabs-toggle-link-border-style");
|
||||
border-width: getVar("tabs-toggle-link-border-width");
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
background-color: getVar("tabs-toggle-link-hover-background-color");
|
||||
border-color: getVar("tabs-toggle-link-hover-border-color");
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
& + li {
|
||||
@include ltr-property(
|
||||
"margin",
|
||||
calc(-1 * #{getVar("tabs-toggle-link-border-width")}),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
&:first-child a {
|
||||
@include ltr {
|
||||
border-top-left-radius: getVar("tabs-toggle-link-radius");
|
||||
border-bottom-left-radius: getVar("tabs-toggle-link-radius");
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
border-top-right-radius: getVar("tabs-toggle-link-radius");
|
||||
border-bottom-right-radius: getVar("tabs-toggle-link-radius");
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child a {
|
||||
@include ltr {
|
||||
border-top-right-radius: getVar("tabs-toggle-link-radius");
|
||||
border-bottom-right-radius: getVar("tabs-toggle-link-radius");
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
border-top-left-radius: getVar("tabs-toggle-link-radius");
|
||||
border-bottom-left-radius: getVar("tabs-toggle-link-radius");
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
a {
|
||||
background-color: getVar("tabs-toggle-link-active-background-color");
|
||||
border-color: getVar("tabs-toggle-link-active-border-color");
|
||||
color: getVar("tabs-toggle-link-active-color");
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.is-toggle-rounded {
|
||||
li {
|
||||
&:first-child a {
|
||||
@include ltr {
|
||||
border-bottom-left-radius: getVar("radius-rounded");
|
||||
border-top-left-radius: getVar("radius-rounded");
|
||||
padding-left: 1.25em;
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
border-bottom-right-radius: getVar("radius-rounded");
|
||||
border-top-right-radius: getVar("radius-rounded");
|
||||
padding-right: 1.25em;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child a {
|
||||
@include ltr {
|
||||
border-bottom-right-radius: getVar("radius-rounded");
|
||||
border-top-right-radius: getVar("radius-rounded");
|
||||
padding-right: 1.25em;
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
border-bottom-left-radius: getVar("radius-rounded");
|
||||
border-top-left-radius: getVar("radius-rounded");
|
||||
padding-left: 1.25em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: getVar("size-large");
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
/* Bulma Elements */
|
||||
@charset "utf-8"
|
||||
|
||||
@import "box"
|
||||
@import "button"
|
||||
@import "container"
|
||||
@import "content"
|
||||
@import "icon"
|
||||
@import "image"
|
||||
@import "notification"
|
||||
@import "progress"
|
||||
@import "table"
|
||||
@import "tag"
|
||||
@import "title"
|
||||
|
||||
@import "other"
|
16
sass/elements/_all.scss
Normal file
16
sass/elements/_all.scss
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* Bulma Elements */
|
||||
@charset "utf-8";
|
||||
|
||||
@import "box";
|
||||
@import "button";
|
||||
@import "container";
|
||||
@import "content";
|
||||
@import "icon";
|
||||
@import "image";
|
||||
@import "notification";
|
||||
@import "progress";
|
||||
@import "table";
|
||||
@import "tag";
|
||||
@import "title";
|
||||
|
||||
@import "other";
|
|
@ -1,26 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$box-color: $text !default
|
||||
$box-background-color: $scheme-main !default
|
||||
$box-radius: $radius-large !default
|
||||
$box-shadow: $shadow !default
|
||||
$box-padding: 1.25rem !default
|
||||
|
||||
$box-link-hover-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0 0 1px $link !default
|
||||
$box-link-active-shadow: inset 0 1px 2px rgba($scheme-invert, 0.2), 0 0 0 1px $link !default
|
||||
|
||||
.box
|
||||
@extend %block
|
||||
background-color: $box-background-color
|
||||
border-radius: $box-radius
|
||||
box-shadow: $box-shadow
|
||||
color: $box-color
|
||||
display: block
|
||||
padding: $box-padding
|
||||
|
||||
a.box
|
||||
&:hover,
|
||||
&:focus
|
||||
box-shadow: $box-link-hover-shadow
|
||||
&:active
|
||||
box-shadow: $box-link-active-shadow
|
48
sass/elements/box.scss
Normal file
48
sass/elements/box.scss
Normal file
|
@ -0,0 +1,48 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$box-color: getVar("text") !default;
|
||||
$box-background-color: getVar("scheme-main") !default;
|
||||
$box-radius: getVar("radius-large") !default;
|
||||
$box-shadow: getVar("shadow") !default;
|
||||
$box-padding: 1.25rem !default;
|
||||
|
||||
$box-link-hover-shadow: 0 0.5em 1em -0.125em rgba(getVar("shadow-color-rgb"), 0.1),
|
||||
0 0 0 1px getVar("link") !default;
|
||||
$box-link-active-shadow: inset 0 1px 2px rgba(getVar("shadow-color-rgb"), 0.2),
|
||||
0 0 0 1px getVar("link") !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
box-color: #{$box-color},
|
||||
box-background-color: #{$box-background-color},
|
||||
box-radius: #{$box-radius},
|
||||
box-shadow: #{$box-shadow},
|
||||
box-padding: #{$box-padding},
|
||||
box-link-hover-shadow: #{$box-link-hover-shadow},
|
||||
box-link-active-shadow: #{$box-link-active-shadow},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}box {
|
||||
@extend %block;
|
||||
|
||||
background-color: getVar("box-background-color");
|
||||
border-radius: getVar("box-radius");
|
||||
box-shadow: getVar("box-shadow");
|
||||
color: getVar("box-color");
|
||||
display: block;
|
||||
padding: getVar("box-padding");
|
||||
}
|
||||
|
||||
a.#{$class-prefix}box {
|
||||
&:hover,
|
||||
&:focus {
|
||||
box-shadow: getVar("box-link-hover-shadow");
|
||||
}
|
||||
|
||||
&:active {
|
||||
box-shadow: getVar("box-link-active-shadow");
|
||||
}
|
||||
}
|
|
@ -1,357 +0,0 @@
|
|||
@import "../utilities/controls"
|
||||
@import "../utilities/mixins"
|
||||
|
||||
$button-color: $text-strong !default
|
||||
$button-background-color: $scheme-main !default
|
||||
$button-family: false !default
|
||||
|
||||
$button-border-color: $border !default
|
||||
$button-border-width: $control-border-width !default
|
||||
|
||||
$button-padding-vertical: calc(0.5em - #{$button-border-width}) !default
|
||||
$button-padding-horizontal: 1em !default
|
||||
|
||||
$button-hover-color: $link-hover !default
|
||||
$button-hover-border-color: $link-hover-border !default
|
||||
|
||||
$button-focus-color: $link-focus !default
|
||||
$button-focus-border-color: $link-focus-border !default
|
||||
$button-focus-box-shadow-size: 0 0 0 0.125em !default
|
||||
$button-focus-box-shadow-color: bulmaRgba($link, 0.25) !default
|
||||
|
||||
$button-active-color: $link-active !default
|
||||
$button-active-border-color: $link-active-border !default
|
||||
|
||||
$button-text-color: $text !default
|
||||
$button-text-decoration: underline !default
|
||||
$button-text-hover-background-color: $background !default
|
||||
$button-text-hover-color: $text-strong !default
|
||||
|
||||
$button-ghost-background: none !default
|
||||
$button-ghost-border-color: transparent !default
|
||||
$button-ghost-color: $link !default
|
||||
$button-ghost-decoration: none !default
|
||||
$button-ghost-hover-color: $link !default
|
||||
$button-ghost-hover-decoration: underline !default
|
||||
|
||||
$button-disabled-background-color: $scheme-main !default
|
||||
$button-disabled-border-color: $border !default
|
||||
$button-disabled-shadow: none !default
|
||||
$button-disabled-opacity: 0.5 !default
|
||||
|
||||
$button-static-color: $text-light !default
|
||||
$button-static-background-color: $scheme-main-ter !default
|
||||
$button-static-border-color: $border !default
|
||||
|
||||
$button-colors: $colors !default
|
||||
$button-responsive-sizes: ("mobile": ("small": ($size-small * 0.75), "normal": ($size-small * 0.875), "medium": $size-small, "large": $size-normal), "tablet-only": ("small": ($size-small * 0.875), "normal": ($size-small), "medium": $size-normal, "large": $size-medium)) !default
|
||||
|
||||
// The button sizes use mixins so they can be used at different breakpoints
|
||||
=button-small
|
||||
&:not(.is-rounded)
|
||||
border-radius: $radius-small
|
||||
font-size: $size-small
|
||||
=button-normal
|
||||
font-size: $size-normal
|
||||
=button-medium
|
||||
font-size: $size-medium
|
||||
=button-large
|
||||
font-size: $size-large
|
||||
|
||||
.button
|
||||
@extend %control
|
||||
@extend %unselectable
|
||||
background-color: $button-background-color
|
||||
border-color: $button-border-color
|
||||
border-width: $button-border-width
|
||||
color: $button-color
|
||||
cursor: pointer
|
||||
@if $button-family
|
||||
font-family: $button-family
|
||||
justify-content: center
|
||||
padding-bottom: $button-padding-vertical
|
||||
padding-left: $button-padding-horizontal
|
||||
padding-right: $button-padding-horizontal
|
||||
padding-top: $button-padding-vertical
|
||||
text-align: center
|
||||
white-space: nowrap
|
||||
strong
|
||||
color: inherit
|
||||
.icon
|
||||
&,
|
||||
&.is-small,
|
||||
&.is-medium,
|
||||
&.is-large
|
||||
height: 1.5em
|
||||
width: 1.5em
|
||||
&:first-child:not(:last-child)
|
||||
+ltr-property("margin", calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width}), false)
|
||||
+ltr-property("margin", $button-padding-horizontal * 0.25)
|
||||
&:last-child:not(:first-child)
|
||||
+ltr-property("margin", $button-padding-horizontal * 0.25, false)
|
||||
+ltr-property("margin", calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width}))
|
||||
&:first-child:last-child
|
||||
margin-left: calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width})
|
||||
margin-right: calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width})
|
||||
// States
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
border-color: $button-hover-border-color
|
||||
color: $button-hover-color
|
||||
&:focus,
|
||||
&.is-focused
|
||||
border-color: $button-focus-border-color
|
||||
color: $button-focus-color
|
||||
&:not(:active)
|
||||
box-shadow: $button-focus-box-shadow-size $button-focus-box-shadow-color
|
||||
&:active,
|
||||
&.is-active
|
||||
border-color: $button-active-border-color
|
||||
color: $button-active-color
|
||||
// Colors
|
||||
&.is-text
|
||||
background-color: transparent
|
||||
border-color: transparent
|
||||
color: $button-text-color
|
||||
text-decoration: $button-text-decoration
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus,
|
||||
&.is-focused
|
||||
background-color: $button-text-hover-background-color
|
||||
color: $button-text-hover-color
|
||||
&:active,
|
||||
&.is-active
|
||||
background-color: bulmaDarken($button-text-hover-background-color, 5%)
|
||||
color: $button-text-hover-color
|
||||
&[disabled],
|
||||
fieldset[disabled] &
|
||||
background-color: transparent
|
||||
border-color: transparent
|
||||
box-shadow: none
|
||||
&.is-ghost
|
||||
background: $button-ghost-background
|
||||
border-color: $button-ghost-border-color
|
||||
color: $button-ghost-color
|
||||
text-decoration: $button-ghost-decoration
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
color: $button-ghost-hover-color
|
||||
text-decoration: $button-ghost-hover-decoration
|
||||
@each $name, $pair in $button-colors
|
||||
$color: nth($pair, 1)
|
||||
$color-invert: nth($pair, 2)
|
||||
&.is-#{$name}
|
||||
background-color: $color
|
||||
border-color: transparent
|
||||
color: $color-invert
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
background-color: bulmaDarken($color, 2.5%)
|
||||
border-color: transparent
|
||||
color: $color-invert
|
||||
&:focus,
|
||||
&.is-focused
|
||||
border-color: transparent
|
||||
color: $color-invert
|
||||
&:not(:active)
|
||||
box-shadow: $button-focus-box-shadow-size bulmaRgba($color, 0.25)
|
||||
&:active,
|
||||
&.is-active
|
||||
background-color: bulmaDarken($color, 5%)
|
||||
border-color: transparent
|
||||
color: $color-invert
|
||||
&[disabled],
|
||||
fieldset[disabled] &
|
||||
background-color: $color
|
||||
border-color: $color
|
||||
box-shadow: none
|
||||
&.is-inverted
|
||||
background-color: $color-invert
|
||||
color: $color
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
background-color: bulmaDarken($color-invert, 5%)
|
||||
&[disabled],
|
||||
fieldset[disabled] &
|
||||
background-color: $color-invert
|
||||
border-color: transparent
|
||||
box-shadow: none
|
||||
color: $color
|
||||
&.is-loading
|
||||
&::after
|
||||
border-color: transparent transparent $color-invert $color-invert !important
|
||||
&.is-outlined
|
||||
background-color: transparent
|
||||
border-color: $color
|
||||
color: $color
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus,
|
||||
&.is-focused
|
||||
background-color: $color
|
||||
border-color: $color
|
||||
color: $color-invert
|
||||
&.is-loading
|
||||
&::after
|
||||
border-color: transparent transparent $color $color !important
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus,
|
||||
&.is-focused
|
||||
&::after
|
||||
border-color: transparent transparent $color-invert $color-invert !important
|
||||
&[disabled],
|
||||
fieldset[disabled] &
|
||||
background-color: transparent
|
||||
border-color: $color
|
||||
box-shadow: none
|
||||
color: $color
|
||||
&.is-inverted.is-outlined
|
||||
background-color: transparent
|
||||
border-color: $color-invert
|
||||
color: $color-invert
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus,
|
||||
&.is-focused
|
||||
background-color: $color-invert
|
||||
color: $color
|
||||
&.is-loading
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus,
|
||||
&.is-focused
|
||||
&::after
|
||||
border-color: transparent transparent $color $color !important
|
||||
&[disabled],
|
||||
fieldset[disabled] &
|
||||
background-color: transparent
|
||||
border-color: $color-invert
|
||||
box-shadow: none
|
||||
color: $color-invert
|
||||
// If light and dark colors are provided
|
||||
@if length($pair) >= 4
|
||||
$color-light: nth($pair, 3)
|
||||
$color-dark: nth($pair, 4)
|
||||
&.is-light
|
||||
background-color: $color-light
|
||||
color: $color-dark
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
background-color: bulmaDarken($color-light, 2.5%)
|
||||
border-color: transparent
|
||||
color: $color-dark
|
||||
&:active,
|
||||
&.is-active
|
||||
background-color: bulmaDarken($color-light, 5%)
|
||||
border-color: transparent
|
||||
color: $color-dark
|
||||
// Sizes
|
||||
&.is-small
|
||||
+button-small
|
||||
&.is-normal
|
||||
+button-normal
|
||||
&.is-medium
|
||||
+button-medium
|
||||
&.is-large
|
||||
+button-large
|
||||
// Modifiers
|
||||
&[disabled],
|
||||
fieldset[disabled] &
|
||||
background-color: $button-disabled-background-color
|
||||
border-color: $button-disabled-border-color
|
||||
box-shadow: $button-disabled-shadow
|
||||
opacity: $button-disabled-opacity
|
||||
&.is-fullwidth
|
||||
display: flex
|
||||
width: 100%
|
||||
&.is-loading
|
||||
color: transparent !important
|
||||
pointer-events: none
|
||||
&::after
|
||||
@extend %loader
|
||||
+center(1em)
|
||||
position: absolute !important
|
||||
&.is-static
|
||||
background-color: $button-static-background-color
|
||||
border-color: $button-static-border-color
|
||||
color: $button-static-color
|
||||
box-shadow: none
|
||||
pointer-events: none
|
||||
&.is-rounded
|
||||
border-radius: $radius-rounded
|
||||
padding-left: calc(#{$button-padding-horizontal} + 0.25em)
|
||||
padding-right: calc(#{$button-padding-horizontal} + 0.25em)
|
||||
|
||||
.buttons
|
||||
align-items: center
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
justify-content: flex-start
|
||||
.button
|
||||
margin-bottom: 0.5rem
|
||||
&:not(:last-child):not(.is-fullwidth)
|
||||
+ltr-property("margin", 0.5rem)
|
||||
&:last-child
|
||||
margin-bottom: -0.5rem
|
||||
&:not(:last-child)
|
||||
margin-bottom: 1rem
|
||||
// Sizes
|
||||
&.are-small
|
||||
.button:not(.is-normal):not(.is-medium):not(.is-large)
|
||||
+button-small
|
||||
&.are-medium
|
||||
.button:not(.is-small):not(.is-normal):not(.is-large)
|
||||
+button-medium
|
||||
&.are-large
|
||||
.button:not(.is-small):not(.is-normal):not(.is-medium)
|
||||
+button-large
|
||||
&.has-addons
|
||||
.button
|
||||
&:not(:first-child)
|
||||
border-bottom-left-radius: 0
|
||||
border-top-left-radius: 0
|
||||
&:not(:last-child)
|
||||
border-bottom-right-radius: 0
|
||||
border-top-right-radius: 0
|
||||
+ltr-property("margin", -1px)
|
||||
&:last-child
|
||||
+ltr-property("margin", 0)
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
z-index: 2
|
||||
&:focus,
|
||||
&.is-focused,
|
||||
&:active,
|
||||
&.is-active,
|
||||
&.is-selected
|
||||
z-index: 3
|
||||
&:hover
|
||||
z-index: 4
|
||||
&.is-expanded
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
&.is-centered
|
||||
justify-content: center
|
||||
&:not(.has-addons)
|
||||
.button:not(.is-fullwidth)
|
||||
margin-left: 0.25rem
|
||||
margin-right: 0.25rem
|
||||
&.is-right
|
||||
justify-content: flex-end
|
||||
&:not(.has-addons)
|
||||
.button:not(.is-fullwidth)
|
||||
margin-left: 0.25rem
|
||||
margin-right: 0.25rem
|
||||
|
||||
@each $bp-name, $bp-sizes in $button-responsive-sizes
|
||||
+breakpoint($bp-name)
|
||||
@each $size, $value in $bp-sizes
|
||||
@if $size != "normal"
|
||||
.button.is-responsive.is-#{$size}
|
||||
font-size: $value
|
||||
@else
|
||||
.button.is-responsive,
|
||||
.button.is-responsive.is-normal
|
||||
font-size: $value
|
668
sass/elements/button.scss
Normal file
668
sass/elements/button.scss
Normal file
|
@ -0,0 +1,668 @@
|
|||
@import "../utilities/controls";
|
||||
@import "../utilities/mixins";
|
||||
|
||||
$button-color: getVar("text-strong") !default;
|
||||
$button-background-color: getVar("scheme-main") !default;
|
||||
$button-family: false !default;
|
||||
$button-weight: getVar("weight-medium") !default;
|
||||
|
||||
$button-border-color: getVar("border") !default;
|
||||
$button-border-width: getVar("control-border-width") !default;
|
||||
|
||||
$button-padding-vertical: calc(
|
||||
0.5em - #{getVar("button-border-width")}
|
||||
) !default;
|
||||
$button-padding-horizontal: 1em !default;
|
||||
|
||||
$button-hover-color: getVar("link-hover") !default;
|
||||
$button-hover-border-color: getVar("link-hover-border") !default;
|
||||
|
||||
$button-focus-color: getVar("link-focus") !default;
|
||||
$button-focus-border-color: getVar("link-focus-border") !default;
|
||||
$button-focus-box-shadow-size: 0 0 0 0.125em !default;
|
||||
$button-focus-box-shadow-color: bulmaRgba($link, 0.25) !default;
|
||||
|
||||
$button-active-color: getVar("link-active") !default;
|
||||
$button-active-border-color: getVar("link-active-border") !default;
|
||||
|
||||
$button-text-color: getVar("text") !default;
|
||||
$button-text-decoration: underline !default;
|
||||
$button-text-hover-background-color: getVar("background") !default;
|
||||
$button-text-hover-color: getVar("text-strong") !default;
|
||||
|
||||
$button-ghost-background: none !default;
|
||||
$button-ghost-border-color: transparent !default;
|
||||
$button-ghost-color: getVar("link") !default;
|
||||
$button-ghost-decoration: none !default;
|
||||
$button-ghost-hover-color: getVar("link") !default;
|
||||
$button-ghost-hover-decoration: underline !default;
|
||||
|
||||
$button-disabled-background-color: getVar("scheme-main") !default;
|
||||
$button-disabled-border-color: getVar("border") !default;
|
||||
$button-disabled-shadow: none !default;
|
||||
$button-disabled-opacity: 0.5 !default;
|
||||
|
||||
$button-static-color: getVar("text-light") !default;
|
||||
$button-static-background-color: getVar("scheme-main-ter") !default;
|
||||
$button-static-border-color: getVar("border") !default;
|
||||
|
||||
$dark-shade: 20 !default;
|
||||
$dark-invert-shade: 90 !default;
|
||||
$light-shade: 90 !default;
|
||||
$light-invert-shade: 50 !default;
|
||||
$button-hover-s: 10% !default;
|
||||
$button-hover-l: -10% !default;
|
||||
$button-active-s: 20% !default;
|
||||
$button-active-l: -20% !default;
|
||||
$button-light-l: 95% !default;
|
||||
$button-light-text-l: 33% !default;
|
||||
$button-light-hover-l: 93% !default;
|
||||
$button-light-active-l: 91% !default;
|
||||
|
||||
$button-colors: $colors !default;
|
||||
$button-responsive-sizes: (
|
||||
"mobile": (
|
||||
"small": calc(#{getVar("size-small")} * 0.75),
|
||||
"normal": calc(#{getVar("size-small")} * 0.875),
|
||||
"medium": getVar("size-small"),
|
||||
"large": getVar("size-normal"),
|
||||
),
|
||||
"tablet-only": (
|
||||
"small": calc(#{getVar("size-small")} * 0.875),
|
||||
"normal": getVar("size-small"),
|
||||
"medium": getVar("size-normal"),
|
||||
"large": getVar("size-medium"),
|
||||
),
|
||||
) !default;
|
||||
|
||||
// The button sizes use mixins so they can be used at different breakpoints
|
||||
@mixin button-small {
|
||||
&:not(.is-rounded) {
|
||||
border-radius: getVar("radius-small");
|
||||
}
|
||||
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
@mixin button-normal {
|
||||
font-size: getVar("size-normal");
|
||||
}
|
||||
|
||||
@mixin button-medium {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
@mixin button-large {
|
||||
font-size: getVar("size-large");
|
||||
}
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
button-color: #{$button-color},
|
||||
button-background-color: #{$button-background-color},
|
||||
button-family: #{$button-family},
|
||||
button-weight: #{$button-weight},
|
||||
button-border-color: #{$button-border-color},
|
||||
button-border-width: #{$button-border-width},
|
||||
button-padding-vertical: #{$button-padding-vertical},
|
||||
button-padding-horizontal: #{$button-padding-horizontal},
|
||||
button-hover-color: #{$button-hover-color},
|
||||
button-hover-border-color: #{$button-hover-border-color},
|
||||
button-focus-color: #{$button-focus-color},
|
||||
button-focus-border-color: #{$button-focus-border-color},
|
||||
button-focus-box-shadow-size: #{$button-focus-box-shadow-size},
|
||||
button-focus-box-shadow-color: #{$button-focus-box-shadow-color},
|
||||
button-active-color: #{$button-active-color},
|
||||
button-active-border-color: #{$button-active-border-color},
|
||||
button-text-color: #{$button-text-color},
|
||||
button-text-decoration: #{$button-text-decoration},
|
||||
button-text-hover-background-color: #{$button-text-hover-background-color},
|
||||
button-text-hover-color: #{$button-text-hover-color},
|
||||
button-ghost-background: #{$button-ghost-background},
|
||||
button-ghost-border-color: #{$button-ghost-border-color},
|
||||
button-ghost-color: #{$button-ghost-color},
|
||||
button-ghost-decoration: #{$button-ghost-decoration},
|
||||
button-ghost-hover-color: #{$button-ghost-hover-color},
|
||||
button-ghost-hover-decoration: #{$button-ghost-hover-decoration},
|
||||
button-disabled-background-color: #{$button-disabled-background-color},
|
||||
button-disabled-border-color: #{$button-disabled-border-color},
|
||||
button-disabled-shadow: #{$button-disabled-shadow},
|
||||
button-disabled-opacity: #{$button-disabled-opacity},
|
||||
button-static-color: #{$button-static-color},
|
||||
button-static-background-color: #{$button-static-background-color},
|
||||
button-static-border-color: #{$button-static-border-color},
|
||||
button-hover-s: #{$button-hover-s},
|
||||
button-hover-l: #{$button-hover-l},
|
||||
button-active-s: #{$button-active-s},
|
||||
button-active-l: #{$button-active-l},
|
||||
button-light-l: #{$button-light-l},
|
||||
button-light-text-l: #{$button-light-text-l},
|
||||
dark-shade: #{$dark-shade},
|
||||
dark-invert-shade: #{$dark-invert-shade},
|
||||
light-shade: #{$light-shade},
|
||||
light-invert-shade: #{$light-invert-shade},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}button {
|
||||
@extend %control;
|
||||
@extend %unselectable;
|
||||
|
||||
background-color: getVar("button-background-color");
|
||||
border-color: getVar("button-border-color");
|
||||
border-width: getVar("button-border-width");
|
||||
color: getVar("button-color");
|
||||
cursor: pointer;
|
||||
font-weight: getVar("button-weight");
|
||||
justify-content: center;
|
||||
padding-bottom: getVar("button-padding-vertical");
|
||||
padding-left: getVar("button-padding-horizontal");
|
||||
padding-right: getVar("button-padding-horizontal");
|
||||
padding-top: getVar("button-padding-vertical");
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
|
||||
@if $button-family {
|
||||
font-family: getVar("button-family");
|
||||
}
|
||||
|
||||
strong {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.#{$class-prefix}icon {
|
||||
&,
|
||||
&.is-small,
|
||||
&.is-medium,
|
||||
&.is-large {
|
||||
height: 1.5em;
|
||||
width: 1.5em;
|
||||
}
|
||||
|
||||
&:first-child:not(:last-child) {
|
||||
@include ltr-property(
|
||||
"margin",
|
||||
calc(
|
||||
calc(-0.5 * #{getVar("button-padding-horizontal")}) - #{getVar(
|
||||
"button-border-width"
|
||||
)}
|
||||
),
|
||||
false
|
||||
);
|
||||
@include ltr-property(
|
||||
"margin",
|
||||
calc(#{getVar("button-padding-horizontal")} * 0.25)
|
||||
);
|
||||
}
|
||||
|
||||
&:last-child:not(:first-child) {
|
||||
@include ltr-property(
|
||||
"margin",
|
||||
calc(#{getVar("button-padding-horizontal")} * 0.25),
|
||||
false
|
||||
);
|
||||
@include ltr-property(
|
||||
"margin",
|
||||
calc(
|
||||
calc(-0.5 * #{getVar("button-padding-horizontal")}) - #{getVar(
|
||||
"button-border-width"
|
||||
)}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
&:first-child:last-child {
|
||||
margin-left: calc(
|
||||
calc(-0.5 * #{getVar("button-padding-horizontal")}) - #{getVar(
|
||||
"button-border-width"
|
||||
)}
|
||||
);
|
||||
margin-right: calc(
|
||||
calc(-0.5 * #{getVar("button-padding-horizontal")}) - #{getVar(
|
||||
"button-border-width"
|
||||
)}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// States
|
||||
&:hover,
|
||||
&.is-hovered {
|
||||
border-color: getVar("button-hover-border-color");
|
||||
color: getVar("button-hover-color");
|
||||
}
|
||||
|
||||
&:focus-visible,
|
||||
&.is-focused {
|
||||
border-color: getVar("button-focus-border-color");
|
||||
color: getVar("button-focus-color");
|
||||
|
||||
&:not(:active) {
|
||||
box-shadow: getVar("button-focus-box-shadow-size")
|
||||
getVar("button-focus-box-shadow-color");
|
||||
}
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.is-active {
|
||||
border-color: getVar("button-active-border-color");
|
||||
color: getVar("button-active-color");
|
||||
}
|
||||
|
||||
// Colors
|
||||
&.is-text {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
color: getVar("button-text-color");
|
||||
text-decoration: getVar("button-text-decoration");
|
||||
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus-visible,
|
||||
&.is-focused {
|
||||
background-color: getVar("button-text-hover-background-color");
|
||||
color: getVar("button-text-hover-color");
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.is-active {
|
||||
// background-color: bulmaDarken($button-text-hover-background-color, 5%); // TODO
|
||||
color: getVar("button-text-hover-color");
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-ghost {
|
||||
background: getVar("button-ghost-background");
|
||||
border-color: getVar("button-ghost-border-color");
|
||||
color: getVar("button-ghost-color");
|
||||
text-decoration: getVar("button-ghost-decoration");
|
||||
|
||||
&:hover,
|
||||
&.is-hovered {
|
||||
color: getVar("button-ghost-hover-color");
|
||||
text-decoration: getVar("button-ghost-hover-decoration");
|
||||
}
|
||||
}
|
||||
|
||||
@each $name, $pair in $button-colors {
|
||||
$base-h: getVar($name, "", "-h");
|
||||
$base-s: getVar($name, "", "-s");
|
||||
$base-l: getVar($name, "", "-l");
|
||||
$invert: getVar($name, "", "-invert");
|
||||
$base: hsla($base-h, var(--s), var(--l), 1);
|
||||
$button-shadow: hsla($base-h, var(--s), var(--l), 0.5);
|
||||
|
||||
&.is-#{$name} {
|
||||
--base-s: #{$base-s};
|
||||
--base-l: #{$base-l};
|
||||
--s: var(--base-s);
|
||||
--l: var(--base-l);
|
||||
background-color: $base;
|
||||
border-color: transparent;
|
||||
color: $invert;
|
||||
|
||||
&:hover,
|
||||
&.is-hovered {
|
||||
--s: calc(var(--base-s) + var(--bulma-button-hover-s));
|
||||
--l: calc(var(--base-l) + var(--bulma-button-hover-l));
|
||||
border-color: transparent;
|
||||
color: $invert;
|
||||
}
|
||||
|
||||
&:focus-visible,
|
||||
&.is-focused {
|
||||
border-color: transparent;
|
||||
color: $invert;
|
||||
|
||||
&:not(:active) {
|
||||
box-shadow: getVar("button-focus-box-shadow-size") $button-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.is-active {
|
||||
--s: calc(var(--base-s) + var(--bulma-button-active-s));
|
||||
--l: calc(var(--base-l) + var(--bulma-button-active-l));
|
||||
border-color: transparent;
|
||||
color: $invert;
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
background-color: $base;
|
||||
border-color: $base;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&.is-inverted {
|
||||
background-color: $invert;
|
||||
color: $base;
|
||||
|
||||
&:hover,
|
||||
&.is-hovered {
|
||||
// background-color: bulmaDarken($color-invert, 5%);
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
background-color: $invert;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
color: $base;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-loading {
|
||||
&::after {
|
||||
border-color: transparent transparent $invert $invert !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-outlined {
|
||||
background-color: transparent;
|
||||
border-color: $base;
|
||||
color: $base;
|
||||
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus-visible,
|
||||
&.is-focused {
|
||||
background-color: $base;
|
||||
border-color: $base;
|
||||
color: $invert;
|
||||
}
|
||||
|
||||
&.is-loading {
|
||||
&::after {
|
||||
border-color: transparent transparent $base $base !important;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus-visible,
|
||||
&.is-focused {
|
||||
&::after {
|
||||
border-color: transparent transparent $invert $invert !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
background-color: transparent;
|
||||
border-color: $base;
|
||||
box-shadow: none;
|
||||
color: $base;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-inverted.is-outlined {
|
||||
background-color: transparent;
|
||||
border-color: $invert;
|
||||
color: $invert;
|
||||
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus-visible,
|
||||
&.is-focused {
|
||||
background-color: $invert;
|
||||
color: $base;
|
||||
}
|
||||
|
||||
&.is-loading {
|
||||
&:hover,
|
||||
&.is-hovered,
|
||||
&:focus-visible,
|
||||
&.is-focused {
|
||||
&::after {
|
||||
border-color: transparent transparent $base $base !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
background-color: transparent;
|
||||
border-color: $invert;
|
||||
box-shadow: none;
|
||||
color: $invert;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-light {
|
||||
--l: var(--bulma-button-light-l);
|
||||
--text-l: var(--bulma-button-light-text-l);
|
||||
// --l: var(--bulma-dark-shade);
|
||||
// background-color: getVar($name, "", "-#{$light-shade}");
|
||||
// color: $base;
|
||||
color: hsla($base-h, var(--s), var(--text-l), 1);
|
||||
|
||||
&:hover,
|
||||
&.is-hovered {
|
||||
background-color: getVar($name, "", "-#{$light-shade - 5}");
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.is-active {
|
||||
background-color: getVar($name, "", "-#{$light-shade - 10}");
|
||||
border-color: transparent;
|
||||
// color: $color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
// If light and dark colors are provided
|
||||
// @if length($pair) >= 4 {
|
||||
// $color-light: nth($pair, 3);
|
||||
// $color-dark: nth($pair, 4);
|
||||
|
||||
// &.is-light {
|
||||
// background-color: $color-light;
|
||||
// color: $color-dark;
|
||||
|
||||
// &:hover,
|
||||
// &.is-hovered {
|
||||
// background-color: bulmaDarken($color-light, 2.5%);
|
||||
// border-color: transparent;
|
||||
// color: $color-dark;
|
||||
// }
|
||||
|
||||
// &:active,
|
||||
// &.is-active {
|
||||
// background-color: bulmaDarken($color-light, 5%);
|
||||
// border-color: transparent;
|
||||
// color: $color-dark;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
@include button-small;
|
||||
}
|
||||
|
||||
&.is-normal {
|
||||
@include button-normal;
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
@include button-medium;
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
@include button-large;
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
background-color: getVar("button-disabled-background-color");
|
||||
border-color: getVar("button-disabled-border-color");
|
||||
box-shadow: getVar("button-disabled-shadow");
|
||||
opacity: getVar("button-disabled-opacity");
|
||||
}
|
||||
|
||||
&.is-fullwidth {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.is-loading {
|
||||
color: transparent !important;
|
||||
pointer-events: none;
|
||||
|
||||
&::after {
|
||||
@extend %loader;
|
||||
@include center(1em);
|
||||
position: absolute !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-static {
|
||||
background-color: getVar("button-static-background-color");
|
||||
border-color: getVar("button-static-border-color");
|
||||
color: getVar("button-static-color");
|
||||
box-shadow: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.is-rounded {
|
||||
border-radius: getVar("radius-rounded");
|
||||
padding-left: calc(#{getVar("button-padding-horizontal")} + 0.25em);
|
||||
padding-right: calc(#{getVar("button-padding-horizontal")} + 0.25em);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}buttons {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.#{$class-prefix}button {
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
&:not(:last-child):not(.is-fullwidth) {
|
||||
@include ltr-property("margin", 0.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: -0.5rem;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.are-small {
|
||||
.#{$class-prefix}button:not(.is-normal):not(.is-medium):not(.is-large) {
|
||||
@include button-small;
|
||||
}
|
||||
}
|
||||
|
||||
&.are-medium {
|
||||
.#{$class-prefix}button:not(.is-small):not(.is-normal):not(.is-large) {
|
||||
@include button-medium;
|
||||
}
|
||||
}
|
||||
|
||||
&.are-large {
|
||||
.#{$class-prefix}button:not(.is-small):not(.is-normal):not(.is-medium) {
|
||||
@include button-large;
|
||||
}
|
||||
}
|
||||
|
||||
&.has-addons {
|
||||
.#{$class-prefix}button {
|
||||
&:not(:first-child) {
|
||||
border-bottom-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
|
||||
@include ltr-property("margin", -1px);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include ltr-property("margin", 0);
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.is-hovered {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&:focus-visible,
|
||||
&.is-focused,
|
||||
&:active,
|
||||
&.is-active,
|
||||
&.is-selected {
|
||||
z-index: 3;
|
||||
|
||||
&:hover {
|
||||
z-index: 4;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-expanded {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-centered {
|
||||
justify-content: center;
|
||||
|
||||
&:not(.has-addons) {
|
||||
.#{$class-prefix}button:not(.is-fullwidth) {
|
||||
margin-left: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
justify-content: flex-end;
|
||||
|
||||
&:not(.has-addons) {
|
||||
.#{$class-prefix}button:not(.is-fullwidth) {
|
||||
margin-left: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@each $bp-name, $bp-sizes in $button-responsive-sizes {
|
||||
@include breakpoint($bp-name) {
|
||||
@each $size, $value in $bp-sizes {
|
||||
@if $size != "normal" {
|
||||
.#{$class-prefix}button.is-responsive.is-#{$size} {
|
||||
font-size: getVar("value");
|
||||
}
|
||||
} @else {
|
||||
.#{$class-prefix}button.is-responsive,
|
||||
.#{$class-prefix}button.is-responsive.is-normal {
|
||||
font-size: getVar("value");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$container-offset: (2 * $gap) !default
|
||||
$container-max-width: $fullhd !default
|
||||
|
||||
.container
|
||||
flex-grow: 1
|
||||
margin: 0 auto
|
||||
position: relative
|
||||
width: auto
|
||||
&.is-fluid
|
||||
max-width: none !important
|
||||
padding-left: $gap
|
||||
padding-right: $gap
|
||||
width: 100%
|
||||
+desktop
|
||||
max-width: $desktop - $container-offset
|
||||
+until-widescreen
|
||||
&.is-widescreen:not(.is-max-desktop)
|
||||
max-width: min($widescreen, $container-max-width) - $container-offset
|
||||
+until-fullhd
|
||||
&.is-fullhd:not(.is-max-desktop):not(.is-max-widescreen)
|
||||
max-width: min($fullhd, $container-max-width) - $container-offset
|
||||
+widescreen
|
||||
&:not(.is-max-desktop)
|
||||
max-width: min($widescreen, $container-max-width) - $container-offset
|
||||
+fullhd
|
||||
&:not(.is-max-desktop):not(.is-max-widescreen)
|
||||
max-width: min($fullhd, $container-max-width) - $container-offset
|
66
sass/elements/container.scss
Normal file
66
sass/elements/container.scss
Normal file
|
@ -0,0 +1,66 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$container-offset: calc(2 * #{getVar("gap")}) !default;
|
||||
$container-max-width: $fullhd !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
container-offset: #{$container-offset},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}container {
|
||||
flex-grow: 1;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
width: auto;
|
||||
|
||||
&.is-fluid {
|
||||
max-width: none !important;
|
||||
padding-left: getVar("gap");
|
||||
padding-right: getVar("gap");
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@include desktop {
|
||||
max-width: calc(#{$desktop} - #{getVar("container-offset")});
|
||||
}
|
||||
|
||||
@include until-widescreen {
|
||||
&.is-widescreen:not(.is-max-desktop) {
|
||||
max-width: calc(
|
||||
#{min($widescreen, $container-max-width)} - #{getVar(
|
||||
"container-offset"
|
||||
)}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@include until-fullhd {
|
||||
&.is-fullhd:not(.is-max-desktop):not(.is-max-widescreen) {
|
||||
max-width: calc(
|
||||
#{min($fullhd, $container-max-width)} - #{getVar("container-offset")}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@include widescreen {
|
||||
&:not(.is-max-desktop) {
|
||||
max-width: calc(
|
||||
#{min($widescreen, $container-max-width)} - #{getVar(
|
||||
"container-offset"
|
||||
)}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@include fullhd {
|
||||
&:not(.is-max-desktop):not(.is-max-widescreen) {
|
||||
max-width: calc(
|
||||
#{min($fullhd, $container-max-width)} - #{getVar("container-offset")}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,162 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$content-heading-color: $text-strong !default
|
||||
$content-heading-weight: $weight-semibold !default
|
||||
$content-heading-line-height: 1.125 !default
|
||||
|
||||
$content-block-margin-bottom: 1em !default
|
||||
|
||||
$content-blockquote-background-color: $background !default
|
||||
$content-blockquote-border-left: 5px solid $border !default
|
||||
$content-blockquote-padding: 1.25em 1.5em !default
|
||||
|
||||
$content-pre-padding: 1.25em 1.5em !default
|
||||
|
||||
$content-table-cell-border: 1px solid $border !default
|
||||
$content-table-cell-border-width: 0 0 1px !default
|
||||
$content-table-cell-padding: 0.5em 0.75em !default
|
||||
$content-table-cell-heading-color: $text-strong !default
|
||||
$content-table-head-cell-border-width: 0 0 2px !default
|
||||
$content-table-head-cell-color: $text-strong !default
|
||||
$content-table-body-last-row-cell-border-bottom-width: 0 !default
|
||||
$content-table-foot-cell-border-width: 2px 0 0 !default
|
||||
$content-table-foot-cell-color: $text-strong !default
|
||||
|
||||
.content
|
||||
@extend %block
|
||||
// Inline
|
||||
li + li
|
||||
margin-top: 0.25em
|
||||
// Block
|
||||
p,
|
||||
dl,
|
||||
ol,
|
||||
ul,
|
||||
blockquote,
|
||||
pre,
|
||||
table
|
||||
&:not(:last-child)
|
||||
margin-bottom: $content-block-margin-bottom
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6
|
||||
color: $content-heading-color
|
||||
font-weight: $content-heading-weight
|
||||
line-height: $content-heading-line-height
|
||||
h1
|
||||
font-size: 2em
|
||||
margin-bottom: 0.5em
|
||||
&:not(:first-child)
|
||||
margin-top: 1em
|
||||
h2
|
||||
font-size: 1.75em
|
||||
margin-bottom: 0.5714em
|
||||
&:not(:first-child)
|
||||
margin-top: 1.1428em
|
||||
h3
|
||||
font-size: 1.5em
|
||||
margin-bottom: 0.6666em
|
||||
&:not(:first-child)
|
||||
margin-top: 1.3333em
|
||||
h4
|
||||
font-size: 1.25em
|
||||
margin-bottom: 0.8em
|
||||
h5
|
||||
font-size: 1.125em
|
||||
margin-bottom: 0.8888em
|
||||
h6
|
||||
font-size: 1em
|
||||
margin-bottom: 1em
|
||||
blockquote
|
||||
background-color: $content-blockquote-background-color
|
||||
+ltr-property("border", $content-blockquote-border-left, false)
|
||||
padding: $content-blockquote-padding
|
||||
ol
|
||||
list-style-position: outside
|
||||
+ltr-property("margin", 2em, false)
|
||||
margin-top: 1em
|
||||
&:not([type])
|
||||
list-style-type: decimal
|
||||
&.is-lower-alpha
|
||||
list-style-type: lower-alpha
|
||||
&.is-lower-roman
|
||||
list-style-type: lower-roman
|
||||
&.is-upper-alpha
|
||||
list-style-type: upper-alpha
|
||||
&.is-upper-roman
|
||||
list-style-type: upper-roman
|
||||
ul
|
||||
list-style: disc outside
|
||||
+ltr-property("margin", 2em, false)
|
||||
margin-top: 1em
|
||||
ul
|
||||
list-style-type: circle
|
||||
margin-top: 0.5em
|
||||
ul
|
||||
list-style-type: square
|
||||
dd
|
||||
+ltr-property("margin", 2em, false)
|
||||
figure
|
||||
margin-left: 2em
|
||||
margin-right: 2em
|
||||
text-align: center
|
||||
&:not(:first-child)
|
||||
margin-top: 2em
|
||||
&:not(:last-child)
|
||||
margin-bottom: 2em
|
||||
img
|
||||
display: inline-block
|
||||
figcaption
|
||||
font-style: italic
|
||||
pre
|
||||
+overflow-touch
|
||||
overflow-x: auto
|
||||
padding: $content-pre-padding
|
||||
white-space: pre
|
||||
word-wrap: normal
|
||||
sup,
|
||||
sub
|
||||
font-size: 75%
|
||||
table
|
||||
width: 100%
|
||||
td,
|
||||
th
|
||||
border: $content-table-cell-border
|
||||
border-width: $content-table-cell-border-width
|
||||
padding: $content-table-cell-padding
|
||||
vertical-align: top
|
||||
th
|
||||
color: $content-table-cell-heading-color
|
||||
&:not([align])
|
||||
text-align: inherit
|
||||
thead
|
||||
td,
|
||||
th
|
||||
border-width: $content-table-head-cell-border-width
|
||||
color: $content-table-head-cell-color
|
||||
tfoot
|
||||
td,
|
||||
th
|
||||
border-width: $content-table-foot-cell-border-width
|
||||
color: $content-table-foot-cell-color
|
||||
tbody
|
||||
tr
|
||||
&:last-child
|
||||
td,
|
||||
th
|
||||
border-bottom-width: $content-table-body-last-row-cell-border-bottom-width
|
||||
.tabs
|
||||
li + li
|
||||
margin-top: 0
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
&.is-normal
|
||||
font-size: $size-normal
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
&.is-large
|
||||
font-size: $size-large
|
284
sass/elements/content.scss
Normal file
284
sass/elements/content.scss
Normal file
|
@ -0,0 +1,284 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$content-heading-color: getVar("text-strong") !default;
|
||||
$content-heading-weight: getVar("weight-semibold") !default;
|
||||
$content-heading-line-height: 1.125 !default;
|
||||
|
||||
$content-block-margin-bottom: 1em !default;
|
||||
|
||||
$content-blockquote-background-color: getVar("background") !default;
|
||||
$content-blockquote-border-left: 5px solid getVar("border") !default;
|
||||
$content-blockquote-padding: 1.25em 1.5em !default;
|
||||
|
||||
$content-pre-padding: 1.25em 1.5em !default;
|
||||
|
||||
$content-table-cell-border: 1px solid getVar("border") !default;
|
||||
$content-table-cell-border-width: 0 0 1px !default;
|
||||
$content-table-cell-padding: 0.5em 0.75em !default;
|
||||
$content-table-cell-heading-color: getVar("text-strong") !default;
|
||||
$content-table-head-cell-border-width: 0 0 2px !default;
|
||||
$content-table-head-cell-color: getVar("text-strong") !default;
|
||||
$content-table-body-last-row-cell-border-bottom-width: 0 !default;
|
||||
$content-table-foot-cell-border-width: 2px 0 0 !default;
|
||||
$content-table-foot-cell-color: getVar("text-strong") !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
content-heading-color: #{$content-heading-color},
|
||||
content-heading-weight: #{$content-heading-weight},
|
||||
content-heading-line-height: #{$content-heading-line-height},
|
||||
content-block-margin-bottom: #{$content-block-margin-bottom},
|
||||
content-blockquote-background-color: #{$content-blockquote-background-color},
|
||||
content-blockquote-border-left: #{$content-blockquote-border-left},
|
||||
content-blockquote-padding: #{$content-blockquote-padding},
|
||||
content-pre-padding: #{$content-pre-padding},
|
||||
content-table-cell-border: #{$content-table-cell-border},
|
||||
content-table-cell-border-width: #{$content-table-cell-border-width},
|
||||
content-table-cell-padding: #{$content-table-cell-padding},
|
||||
content-table-cell-heading-color: #{$content-table-cell-heading-color},
|
||||
content-table-head-cell-border-width: #{$content-table-head-cell-border-width},
|
||||
content-table-head-cell-color: #{$content-table-head-cell-color},
|
||||
content-table-body-last-row-cell-border-bottom-width: #{$content-table-body-last-row-cell-border-bottom-width},
|
||||
content-table-foot-cell-border-width: #{$content-table-foot-cell-border-width},
|
||||
content-table-foot-cell-color: #{$content-table-foot-cell-color},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}content {
|
||||
@extend %block;
|
||||
|
||||
// Inline
|
||||
li + li {
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
|
||||
// Block
|
||||
p,
|
||||
dl,
|
||||
ol,
|
||||
ul,
|
||||
blockquote,
|
||||
pre,
|
||||
table {
|
||||
&:not(:last-child) {
|
||||
margin-bottom: getVar("content-block-margin-bottom");
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: getVar("content-heading-color");
|
||||
font-weight: getVar("content-heading-weight");
|
||||
line-height: getVar("content-heading-line-height");
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin-bottom: 0.5em;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.75em;
|
||||
margin-bottom: 0.5714em;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: 1.1428em;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.5em;
|
||||
margin-bottom: 0.6666em;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: 1.3333em;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.25em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.125em;
|
||||
margin-bottom: 0.8888em;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
background-color: getVar("content-blockquote-background-color");
|
||||
@include ltr-property(
|
||||
"border",
|
||||
getVar("content-blockquote-border-left"),
|
||||
false
|
||||
);
|
||||
padding: getVar("content-blockquote-padding");
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style-position: outside;
|
||||
@include ltr-property("margin", 2em, false);
|
||||
margin-top: 1em;
|
||||
|
||||
&:not([type]) {
|
||||
list-style-type: decimal;
|
||||
|
||||
&.is-lower-alpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
&.is-lower-roman {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
&.is-upper-alpha {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
|
||||
&.is-upper-roman {
|
||||
list-style-type: upper-roman;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: disc outside;
|
||||
@include ltr-property("margin", 2em, false);
|
||||
margin-top: 1em;
|
||||
|
||||
ul {
|
||||
list-style-type: circle;
|
||||
margin-top: 0.5em;
|
||||
|
||||
ul {
|
||||
list-style-type: square;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dd {
|
||||
@include ltr-property("margin", 2em, false);
|
||||
}
|
||||
|
||||
figure {
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
text-align: center;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
@include overflow-touch;
|
||||
overflow-x: auto;
|
||||
padding: getVar("content-pre-padding");
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
sup,
|
||||
sub {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
|
||||
td,
|
||||
th {
|
||||
border: getVar("content-table-cell-border");
|
||||
border-width: getVar("content-table-cell-border-width");
|
||||
padding: getVar("content-table-cell-padding");
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
color: getVar("content-table-cell-heading-color");
|
||||
|
||||
&:not([align]) {
|
||||
text-align: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
thead {
|
||||
td,
|
||||
th {
|
||||
border-width: getVar("content-table-head-cell-border-width");
|
||||
color: getVar("content-table-head-cell-color");
|
||||
}
|
||||
}
|
||||
|
||||
tfoot {
|
||||
td,
|
||||
th {
|
||||
border-width: getVar("content-table-foot-cell-border-width");
|
||||
color: getVar("content-table-foot-cell-color");
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
tr {
|
||||
&:last-child {
|
||||
td,
|
||||
th {
|
||||
border-bottom-width: getVar(
|
||||
"content-table-body-last-row-cell-border-bottom-width"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}tabs {
|
||||
li + li {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-normal {
|
||||
font-size: getVar("size-normal");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: getVar("size-large");
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@warn "The form.sass file is DEPRECATED. It has moved into its own /form folder. Please import sass/form/_all instead."
|
1
sass/elements/form.scss
Normal file
1
sass/elements/form.scss
Normal file
|
@ -0,0 +1 @@
|
|||
@warn "The form.scss file is DEPRECATED. It has moved into its own /form folder. Please import sass/form/_all instead.";
|
|
@ -1,46 +0,0 @@
|
|||
$icon-dimensions: 1.5rem !default
|
||||
$icon-dimensions-small: 1rem !default
|
||||
$icon-dimensions-medium: 2rem !default
|
||||
$icon-dimensions-large: 3rem !default
|
||||
$icon-text-spacing: 0.25em !default
|
||||
|
||||
.icon
|
||||
align-items: center
|
||||
display: inline-flex
|
||||
justify-content: center
|
||||
height: $icon-dimensions
|
||||
width: $icon-dimensions
|
||||
// Sizes
|
||||
&.is-small
|
||||
height: $icon-dimensions-small
|
||||
width: $icon-dimensions-small
|
||||
&.is-medium
|
||||
height: $icon-dimensions-medium
|
||||
width: $icon-dimensions-medium
|
||||
&.is-large
|
||||
height: $icon-dimensions-large
|
||||
width: $icon-dimensions-large
|
||||
|
||||
.icon-text
|
||||
align-items: flex-start
|
||||
color: inherit
|
||||
display: inline-flex
|
||||
flex-wrap: wrap
|
||||
line-height: $icon-dimensions
|
||||
vertical-align: top
|
||||
.icon
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
&:not(:last-child)
|
||||
+ltr
|
||||
margin-right: $icon-text-spacing
|
||||
+rtl
|
||||
margin-left: $icon-text-spacing
|
||||
&:not(:first-child)
|
||||
+ltr
|
||||
margin-left: $icon-text-spacing
|
||||
+rtl
|
||||
margin-right: $icon-text-spacing
|
||||
|
||||
div.icon-text
|
||||
display: flex
|
79
sass/elements/icon.scss
Normal file
79
sass/elements/icon.scss
Normal file
|
@ -0,0 +1,79 @@
|
|||
$icon-dimensions: 1.5rem !default;
|
||||
$icon-dimensions-small: 1rem !default;
|
||||
$icon-dimensions-medium: 2rem !default;
|
||||
$icon-dimensions-large: 3rem !default;
|
||||
$icon-text-spacing: 0.25em !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
icon-dimensions: #{$icon-dimensions},
|
||||
icon-dimensions-small: #{$icon-dimensions-small},
|
||||
icon-dimensions-medium: #{$icon-dimensions-medium},
|
||||
icon-dimensions-large: #{$icon-dimensions-large},
|
||||
icon-text-spacing: #{$icon-text-spacing},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}icon {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
height: getVar("icon-dimensions");
|
||||
width: getVar("icon-dimensions");
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
height: getVar("icon-dimensions-small");
|
||||
width: getVar("icon-dimensions-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
height: getVar("icon-dimensions-medium");
|
||||
width: getVar("icon-dimensions-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
height: getVar("icon-dimensions-large");
|
||||
width: getVar("icon-dimensions-large");
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}icon-text {
|
||||
align-items: flex-start;
|
||||
color: inherit;
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
line-height: getVar("icon-dimensions");
|
||||
vertical-align: top;
|
||||
|
||||
.#{$class-prefix}icon {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
|
||||
&:not(:last-child) {
|
||||
@include ltr {
|
||||
margin-right: getVar("icon-text-spacing");
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
margin-left: getVar("icon-text-spacing");
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:first-child) {
|
||||
@include ltr {
|
||||
margin-left: getVar("icon-text-spacing");
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
margin-right: getVar("icon-text-spacing");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.#{$class-prefix}icon-text {
|
||||
display: flex;
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$dimensions: 16 24 32 48 64 96 128 !default
|
||||
|
||||
.image
|
||||
display: block
|
||||
position: relative
|
||||
img
|
||||
display: block
|
||||
height: auto
|
||||
width: 100%
|
||||
&.is-rounded
|
||||
border-radius: $radius-rounded
|
||||
&.is-fullwidth
|
||||
width: 100%
|
||||
// Ratio
|
||||
&.is-square,
|
||||
&.is-1by1,
|
||||
&.is-5by4,
|
||||
&.is-4by3,
|
||||
&.is-3by2,
|
||||
&.is-5by3,
|
||||
&.is-16by9,
|
||||
&.is-2by1,
|
||||
&.is-3by1,
|
||||
&.is-4by5,
|
||||
&.is-3by4,
|
||||
&.is-2by3,
|
||||
&.is-3by5,
|
||||
&.is-9by16,
|
||||
&.is-1by2,
|
||||
&.is-1by3
|
||||
img,
|
||||
.has-ratio
|
||||
@extend %overlay
|
||||
height: 100%
|
||||
width: 100%
|
||||
&.is-square,
|
||||
&.is-1by1
|
||||
padding-top: 100%
|
||||
&.is-5by4
|
||||
padding-top: 80%
|
||||
&.is-4by3
|
||||
padding-top: 75%
|
||||
&.is-3by2
|
||||
padding-top: 66.6666%
|
||||
&.is-5by3
|
||||
padding-top: 60%
|
||||
&.is-16by9
|
||||
padding-top: 56.25%
|
||||
&.is-2by1
|
||||
padding-top: 50%
|
||||
&.is-3by1
|
||||
padding-top: 33.3333%
|
||||
&.is-4by5
|
||||
padding-top: 125%
|
||||
&.is-3by4
|
||||
padding-top: 133.3333%
|
||||
&.is-2by3
|
||||
padding-top: 150%
|
||||
&.is-3by5
|
||||
padding-top: 166.6666%
|
||||
&.is-9by16
|
||||
padding-top: 177.7777%
|
||||
&.is-1by2
|
||||
padding-top: 200%
|
||||
&.is-1by3
|
||||
padding-top: 300%
|
||||
// Sizes
|
||||
@each $dimension in $dimensions
|
||||
&.is-#{$dimension}x#{$dimension}
|
||||
height: $dimension * 1px
|
||||
width: $dimension * 1px
|
117
sass/elements/image.scss
Normal file
117
sass/elements/image.scss
Normal file
|
@ -0,0 +1,117 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$dimensions: 16 24 32 48 64 96 128 !default;
|
||||
|
||||
.#{$class-prefix}image {
|
||||
display: block;
|
||||
position: relative;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
|
||||
&.is-rounded {
|
||||
border-radius: getVar("radius-rounded");
|
||||
}
|
||||
}
|
||||
|
||||
&.is-fullwidth {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Ratio
|
||||
&.is-square,
|
||||
&.is-1by1,
|
||||
&.is-5by4,
|
||||
&.is-4by3,
|
||||
&.is-3by2,
|
||||
&.is-5by3,
|
||||
&.is-16by9,
|
||||
&.is-2by1,
|
||||
&.is-3by1,
|
||||
&.is-4by5,
|
||||
&.is-3by4,
|
||||
&.is-2by3,
|
||||
&.is-3by5,
|
||||
&.is-9by16,
|
||||
&.is-1by2,
|
||||
&.is-1by3 {
|
||||
img,
|
||||
.has-ratio {
|
||||
@extend %overlay;
|
||||
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-square,
|
||||
&.is-1by1 {
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
&.is-5by4 {
|
||||
padding-top: 80%;
|
||||
}
|
||||
|
||||
&.is-4by3 {
|
||||
padding-top: 75%;
|
||||
}
|
||||
|
||||
&.is-3by2 {
|
||||
padding-top: 66.6666%;
|
||||
}
|
||||
|
||||
&.is-5by3 {
|
||||
padding-top: 60%;
|
||||
}
|
||||
|
||||
&.is-16by9 {
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
|
||||
&.is-2by1 {
|
||||
padding-top: 50%;
|
||||
}
|
||||
|
||||
&.is-3by1 {
|
||||
padding-top: 33.3333%;
|
||||
}
|
||||
|
||||
&.is-4by5 {
|
||||
padding-top: 125%;
|
||||
}
|
||||
|
||||
&.is-3by4 {
|
||||
padding-top: 133.3333%;
|
||||
}
|
||||
|
||||
&.is-2by3 {
|
||||
padding-top: 150%;
|
||||
}
|
||||
|
||||
&.is-3by5 {
|
||||
padding-top: 166.6666%;
|
||||
}
|
||||
|
||||
&.is-9by16 {
|
||||
padding-top: 177.7777%;
|
||||
}
|
||||
|
||||
&.is-1by2 {
|
||||
padding-top: 200%;
|
||||
}
|
||||
|
||||
&.is-1by3 {
|
||||
padding-top: 300%;
|
||||
}
|
||||
|
||||
// Sizes
|
||||
@each $dimension in $dimensions {
|
||||
&.is-#{$dimension}x#{$dimension} {
|
||||
height: $dimension * 1px;
|
||||
width: $dimension * 1px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$notification-background-color: $background !default
|
||||
$notification-code-background-color: $scheme-main !default
|
||||
$notification-radius: $radius !default
|
||||
$notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
|
||||
$notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default
|
||||
$notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
|
||||
|
||||
$notification-colors: $colors !default
|
||||
|
||||
.notification
|
||||
@extend %block
|
||||
background-color: $notification-background-color
|
||||
border-radius: $notification-radius
|
||||
position: relative
|
||||
+ltr
|
||||
padding: $notification-padding-ltr
|
||||
+rtl
|
||||
padding: $notification-padding-rtl
|
||||
a:not(.button):not(.dropdown-item)
|
||||
color: currentColor
|
||||
text-decoration: underline
|
||||
strong
|
||||
color: currentColor
|
||||
code,
|
||||
pre
|
||||
background: $notification-code-background-color
|
||||
pre code
|
||||
background: transparent
|
||||
& > .delete
|
||||
+ltr-position(0.5rem)
|
||||
position: absolute
|
||||
top: 0.5rem
|
||||
.title,
|
||||
.subtitle,
|
||||
.content
|
||||
color: currentColor
|
||||
// Colors
|
||||
@each $name, $pair in $notification-colors
|
||||
$color: nth($pair, 1)
|
||||
$color-invert: nth($pair, 2)
|
||||
&.is-#{$name}
|
||||
background-color: $color
|
||||
color: $color-invert
|
||||
// If light and dark colors are provided
|
||||
@if length($pair) >= 4
|
||||
$color-light: nth($pair, 3)
|
||||
$color-dark: nth($pair, 4)
|
||||
&.is-light
|
||||
background-color: $color-light
|
||||
color: $color-dark
|
91
sass/elements/notification.scss
Normal file
91
sass/elements/notification.scss
Normal file
|
@ -0,0 +1,91 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$notification-background-color: getVar("background") !default;
|
||||
$notification-code-background-color: getVar("scheme-main") !default;
|
||||
$notification-radius: getVar("radius") !default;
|
||||
$notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default;
|
||||
$notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default;
|
||||
$notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default;
|
||||
|
||||
$notification-colors: $colors !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
notification-background-color: #{$notification-background-color},
|
||||
notification-code-background-color: #{$notification-code-background-color},
|
||||
notification-radius: #{$notification-radius},
|
||||
notification-padding: #{$notification-padding},
|
||||
notification-padding-ltr: #{$notification-padding-ltr},
|
||||
notification-padding-rtl: #{$notification-padding-rtl},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}notification {
|
||||
@extend %block;
|
||||
|
||||
background-color: getVar("notification-background-color");
|
||||
border-radius: getVar("notification-radius");
|
||||
position: relative;
|
||||
|
||||
@include ltr {
|
||||
padding: getVar("notification-padding-ltr");
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
padding: getVar("notification-padding-rtl");
|
||||
}
|
||||
|
||||
a:not(.#{$class-prefix}button):not(.#{$class-prefix}dropdown-item) {
|
||||
color: currentColor;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
code,
|
||||
pre {
|
||||
background: getVar("notification-code-background-color");
|
||||
}
|
||||
|
||||
pre code {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
& > .#{$class-prefix}delete {
|
||||
@include ltr-position(0.5rem);
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
||||
.#{$class-prefix}title,
|
||||
.#{$class-prefix}subtitle,
|
||||
.#{$class-prefix}content {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
// Colors
|
||||
@each $name, $pair in $notification-colors {
|
||||
$color: nth($pair, 1);
|
||||
$color-invert: nth($pair, 2);
|
||||
|
||||
&.is-#{$name} {
|
||||
background-color: $color;
|
||||
color: $color-invert;
|
||||
|
||||
// If light and dark colors are provided
|
||||
@if length($pair) >= 4 {
|
||||
$color-light: nth($pair, 3);
|
||||
$color-dark: nth($pair, 4);
|
||||
|
||||
&.is-light {
|
||||
background-color: $color-light;
|
||||
color: $color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
.block
|
||||
@extend %block
|
||||
|
||||
.delete
|
||||
@extend %delete
|
||||
|
||||
.heading
|
||||
display: block
|
||||
font-size: 11px
|
||||
letter-spacing: 1px
|
||||
margin-bottom: 5px
|
||||
text-transform: uppercase
|
||||
|
||||
.loader
|
||||
@extend %loader
|
||||
|
||||
.number
|
||||
align-items: center
|
||||
background-color: $background
|
||||
border-radius: $radius-rounded
|
||||
display: inline-flex
|
||||
font-size: $size-medium
|
||||
height: 2em
|
||||
justify-content: center
|
||||
margin-right: 1.5rem
|
||||
min-width: 2.5em
|
||||
padding: 0.25rem 0.5rem
|
||||
text-align: center
|
||||
vertical-align: top
|
36
sass/elements/other.scss
Normal file
36
sass/elements/other.scss
Normal file
|
@ -0,0 +1,36 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
.#{$class-prefix}block {
|
||||
@extend %block;
|
||||
}
|
||||
|
||||
.#{$class-prefix}delete {
|
||||
@extend %delete;
|
||||
}
|
||||
|
||||
.#{$class-prefix}heading {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.#{$class-prefix}loader {
|
||||
@extend %loader;
|
||||
}
|
||||
|
||||
.#{$class-prefix}number {
|
||||
align-items: center;
|
||||
background-color: getVar("background");
|
||||
border-radius: getVar("radius-rounded");
|
||||
display: inline-flex;
|
||||
font-size: getVar("size-medium");
|
||||
height: 2em;
|
||||
justify-content: center;
|
||||
margin-right: 1.5rem;
|
||||
min-width: 2.5em;
|
||||
padding: 0.25rem 0.5rem;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$progress-bar-background-color: $border-light !default
|
||||
$progress-value-background-color: $text !default
|
||||
$progress-border-radius: $radius-rounded !default
|
||||
|
||||
$progress-indeterminate-duration: 1.5s !default
|
||||
|
||||
$progress-colors: $colors !default
|
||||
|
||||
.progress
|
||||
@extend %block
|
||||
-moz-appearance: none
|
||||
-webkit-appearance: none
|
||||
border: none
|
||||
border-radius: $progress-border-radius
|
||||
display: block
|
||||
height: $size-normal
|
||||
overflow: hidden
|
||||
padding: 0
|
||||
width: 100%
|
||||
&::-webkit-progress-bar
|
||||
background-color: $progress-bar-background-color
|
||||
&::-webkit-progress-value
|
||||
background-color: $progress-value-background-color
|
||||
&::-moz-progress-bar
|
||||
background-color: $progress-value-background-color
|
||||
&::-ms-fill
|
||||
background-color: $progress-value-background-color
|
||||
border: none
|
||||
// Colors
|
||||
@each $name, $pair in $progress-colors
|
||||
$color: nth($pair, 1)
|
||||
&.is-#{$name}
|
||||
&::-webkit-progress-value
|
||||
background-color: $color
|
||||
&::-moz-progress-bar
|
||||
background-color: $color
|
||||
&::-ms-fill
|
||||
background-color: $color
|
||||
&:indeterminate
|
||||
background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color 30%)
|
||||
|
||||
&:indeterminate
|
||||
animation-duration: $progress-indeterminate-duration
|
||||
animation-iteration-count: infinite
|
||||
animation-name: moveIndeterminate
|
||||
animation-timing-function: linear
|
||||
background-color: $progress-bar-background-color
|
||||
background-image: linear-gradient(to right, $text 30%, $progress-bar-background-color 30%)
|
||||
background-position: top left
|
||||
background-repeat: no-repeat
|
||||
background-size: 150% 150%
|
||||
&::-webkit-progress-bar
|
||||
background-color: transparent
|
||||
&::-moz-progress-bar
|
||||
background-color: transparent
|
||||
&::-ms-fill
|
||||
animation-name: none
|
||||
|
||||
// Sizes
|
||||
&.is-small
|
||||
height: $size-small
|
||||
&.is-medium
|
||||
height: $size-medium
|
||||
&.is-large
|
||||
height: $size-large
|
||||
|
||||
@keyframes moveIndeterminate
|
||||
from
|
||||
background-position: 200% 0
|
||||
to
|
||||
background-position: -200% 0
|
129
sass/elements/progress.scss
Normal file
129
sass/elements/progress.scss
Normal file
|
@ -0,0 +1,129 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$progress-bar-background-color: getVar("border-light") !default;
|
||||
$progress-value-background-color: getVar("text") !default;
|
||||
$progress-border-radius: getVar("radius-rounded") !default;
|
||||
|
||||
$progress-indeterminate-duration: 1.5s !default;
|
||||
|
||||
$progress-colors: $colors !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
progress-bar-background-color: #{$progress-bar-background-color},
|
||||
progress-value-background-color: #{$progress-value-background-color},
|
||||
progress-border-radius: #{$progress-border-radius},
|
||||
progress-indeterminate-duration: #{$progress-indeterminate-duration},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}progress {
|
||||
@extend %block;
|
||||
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
border: none;
|
||||
border-radius: getVar("progress-border-radius");
|
||||
display: block;
|
||||
height: getVar("size-normal");
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
|
||||
&::-webkit-progress-bar {
|
||||
background-color: getVar("progress-bar-background-color");
|
||||
}
|
||||
|
||||
&::-webkit-progress-value {
|
||||
background-color: getVar("progress-value-background-color");
|
||||
}
|
||||
|
||||
&::-moz-progress-bar {
|
||||
background-color: getVar("progress-value-background-color");
|
||||
}
|
||||
|
||||
&::-ms-fill {
|
||||
background-color: getVar("progress-value-background-color");
|
||||
border: none;
|
||||
}
|
||||
|
||||
// Colors
|
||||
@each $name, $pair in $progress-colors {
|
||||
$color: nth($pair, 1);
|
||||
|
||||
&.is-#{$name} {
|
||||
&::-webkit-progress-value {
|
||||
background-color: $color;
|
||||
}
|
||||
|
||||
&::-moz-progress-bar {
|
||||
background-color: $color;
|
||||
}
|
||||
|
||||
&::-ms-fill {
|
||||
background-color: $color;
|
||||
}
|
||||
|
||||
&:indeterminate {
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
$color 30%,
|
||||
#{getVar("progress-bar-background-color")} 30%
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:indeterminate {
|
||||
animation-duration: getVar("progress-indeterminate-duration");
|
||||
animation-iteration-count: infinite;
|
||||
animation-name: moveIndeterminate;
|
||||
animation-timing-function: linear;
|
||||
background-color: getVar("progress-bar-background-color");
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
#{getVar("text")} 30%,
|
||||
#{getVar("progress-bar-background-color")} 30%
|
||||
);
|
||||
background-position: top left;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 150% 150%;
|
||||
|
||||
&::-webkit-progress-bar {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&::-moz-progress-bar {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&::-ms-fill {
|
||||
animation-name: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
height: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
height: getVar("size-medium");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
height: getVar("size-large");
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes moveIndeterminate {
|
||||
from {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
to {
|
||||
background-position: (-200%) 0;
|
||||
}
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$table-color: $text-strong !default
|
||||
$table-background-color: $scheme-main !default
|
||||
|
||||
$table-cell-border: 1px solid $border !default
|
||||
$table-cell-border-width: 0 0 1px !default
|
||||
$table-cell-padding: 0.5em 0.75em !default
|
||||
$table-cell-heading-color: $text-strong !default
|
||||
$table-cell-text-align: left !default
|
||||
|
||||
$table-head-cell-border-width: 0 0 2px !default
|
||||
$table-head-cell-color: $text-strong !default
|
||||
$table-foot-cell-border-width: 2px 0 0 !default
|
||||
$table-foot-cell-color: $text-strong !default
|
||||
|
||||
$table-head-background-color: transparent !default
|
||||
$table-body-background-color: transparent !default
|
||||
$table-foot-background-color: transparent !default
|
||||
|
||||
$table-row-hover-background-color: $scheme-main-bis !default
|
||||
|
||||
$table-row-active-background-color: $primary !default
|
||||
$table-row-active-color: $primary-invert !default
|
||||
|
||||
$table-striped-row-even-background-color: $scheme-main-bis !default
|
||||
$table-striped-row-even-hover-background-color: $scheme-main-ter !default
|
||||
|
||||
$table-colors: $colors !default
|
||||
|
||||
.table
|
||||
@extend %block
|
||||
background-color: $table-background-color
|
||||
color: $table-color
|
||||
td,
|
||||
th
|
||||
border: $table-cell-border
|
||||
border-width: $table-cell-border-width
|
||||
padding: $table-cell-padding
|
||||
vertical-align: top
|
||||
// Colors
|
||||
@each $name, $pair in $table-colors
|
||||
$color: nth($pair, 1)
|
||||
$color-invert: nth($pair, 2)
|
||||
&.is-#{$name}
|
||||
background-color: $color
|
||||
border-color: $color
|
||||
color: $color-invert
|
||||
// Modifiers
|
||||
&.is-narrow
|
||||
white-space: nowrap
|
||||
width: 1%
|
||||
&.is-selected
|
||||
background-color: $table-row-active-background-color
|
||||
color: $table-row-active-color
|
||||
a,
|
||||
strong
|
||||
color: currentColor
|
||||
&.is-vcentered
|
||||
vertical-align: middle
|
||||
th
|
||||
color: $table-cell-heading-color
|
||||
&:not([align])
|
||||
text-align: $table-cell-text-align
|
||||
tr
|
||||
&.is-selected
|
||||
background-color: $table-row-active-background-color
|
||||
color: $table-row-active-color
|
||||
a,
|
||||
strong
|
||||
color: currentColor
|
||||
td,
|
||||
th
|
||||
border-color: $table-row-active-color
|
||||
color: currentColor
|
||||
thead
|
||||
background-color: $table-head-background-color
|
||||
td,
|
||||
th
|
||||
border-width: $table-head-cell-border-width
|
||||
color: $table-head-cell-color
|
||||
tfoot
|
||||
background-color: $table-foot-background-color
|
||||
td,
|
||||
th
|
||||
border-width: $table-foot-cell-border-width
|
||||
color: $table-foot-cell-color
|
||||
tbody
|
||||
background-color: $table-body-background-color
|
||||
tr
|
||||
&:last-child
|
||||
td,
|
||||
th
|
||||
border-bottom-width: 0
|
||||
// Modifiers
|
||||
&.is-bordered
|
||||
td,
|
||||
th
|
||||
border-width: 1px
|
||||
tr
|
||||
&:last-child
|
||||
td,
|
||||
th
|
||||
border-bottom-width: 1px
|
||||
&.is-fullwidth
|
||||
width: 100%
|
||||
&.is-hoverable
|
||||
tbody
|
||||
tr:not(.is-selected)
|
||||
&:hover
|
||||
background-color: $table-row-hover-background-color
|
||||
&.is-striped
|
||||
tbody
|
||||
tr:not(.is-selected)
|
||||
&:hover
|
||||
background-color: $table-row-hover-background-color
|
||||
&:nth-child(even)
|
||||
background-color: $table-striped-row-even-hover-background-color
|
||||
&.is-narrow
|
||||
td,
|
||||
th
|
||||
padding: 0.25em 0.5em
|
||||
&.is-striped
|
||||
tbody
|
||||
tr:not(.is-selected)
|
||||
&:nth-child(even)
|
||||
background-color: $table-striped-row-even-background-color
|
||||
|
||||
.table-container
|
||||
@extend %block
|
||||
+overflow-touch
|
||||
overflow: auto
|
||||
overflow-y: hidden
|
||||
max-width: 100%
|
235
sass/elements/table.scss
Normal file
235
sass/elements/table.scss
Normal file
|
@ -0,0 +1,235 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$table-color: getVar("text-strong") !default;
|
||||
$table-background-color: getVar("scheme-main") !default;
|
||||
|
||||
$table-cell-border: 1px solid getVar("border") !default;
|
||||
$table-cell-border-width: 0 0 1px !default;
|
||||
$table-cell-padding: 0.5em 0.75em !default;
|
||||
$table-cell-heading-color: getVar("text-strong") !default;
|
||||
$table-cell-text-align: left !default;
|
||||
|
||||
$table-head-cell-border-width: 0 0 2px !default;
|
||||
$table-head-cell-color: getVar("text-strong") !default;
|
||||
$table-foot-cell-border-width: 2px 0 0 !default;
|
||||
$table-foot-cell-color: getVar("text-strong") !default;
|
||||
|
||||
$table-head-background-color: transparent !default;
|
||||
$table-body-background-color: transparent !default;
|
||||
$table-foot-background-color: transparent !default;
|
||||
|
||||
$table-row-hover-background-color: getVar("scheme-main-bis") !default;
|
||||
|
||||
$table-row-active-background-color: getVar("primary") !default;
|
||||
$table-row-active-color: getVar("primary-invert") !default;
|
||||
|
||||
$table-striped-row-even-background-color: getVar("scheme-main-bis") !default;
|
||||
$table-striped-row-even-hover-background-color: getVar(
|
||||
"scheme-main-ter"
|
||||
) !default;
|
||||
|
||||
$table-colors: $colors !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
table-color: #{$table-color},
|
||||
table-background-color: #{$table-background-color},
|
||||
table-cell-border: #{$table-cell-border},
|
||||
table-cell-border-width: #{$table-cell-border-width},
|
||||
table-cell-padding: #{$table-cell-padding},
|
||||
table-cell-heading-color: #{$table-cell-heading-color},
|
||||
table-cell-text-align: #{$table-cell-text-align},
|
||||
table-head-cell-border-width: #{$table-head-cell-border-width},
|
||||
table-head-cell-color: #{$table-head-cell-color},
|
||||
table-foot-cell-border-width: #{$table-foot-cell-border-width},
|
||||
table-foot-cell-color: #{$table-foot-cell-color},
|
||||
table-head-background-color: #{$table-head-background-color},
|
||||
table-body-background-color: #{$table-body-background-color},
|
||||
table-foot-background-color: #{$table-foot-background-color},
|
||||
table-row-hover-background-color: #{$table-row-hover-background-color},
|
||||
table-row-active-background-color: #{$table-row-active-background-color},
|
||||
table-row-active-color: #{$table-row-active-color},
|
||||
table-striped-row-even-background-color: #{$table-striped-row-even-background-color},
|
||||
table-striped-row-even-hover-background-color: #{$table-striped-row-even-hover-background-color},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}table {
|
||||
@extend %block;
|
||||
|
||||
background-color: getVar("table-background-color");
|
||||
color: getVar("table-color");
|
||||
|
||||
td,
|
||||
th {
|
||||
border: getVar("table-cell-border");
|
||||
border-width: getVar("table-cell-border-width");
|
||||
padding: getVar("table-cell-padding");
|
||||
vertical-align: top;
|
||||
|
||||
// Colors
|
||||
@each $name, $pair in $table-colors {
|
||||
$color: nth($pair, 1);
|
||||
$color-invert: nth($pair, 2);
|
||||
|
||||
&.is-#{$name} {
|
||||
background-color: $color;
|
||||
border-color: $color;
|
||||
color: $color-invert;
|
||||
}
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.is-narrow {
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
&.is-selected {
|
||||
background-color: getVar("table-row-active-background-color");
|
||||
color: getVar("table-row-active-color");
|
||||
|
||||
a,
|
||||
strong {
|
||||
color: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-vcentered {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
th {
|
||||
color: getVar("table-cell-heading-color");
|
||||
|
||||
&:not([align]) {
|
||||
text-align: getVar("table-cell-text-align");
|
||||
}
|
||||
}
|
||||
|
||||
tr {
|
||||
&.is-selected {
|
||||
background-color: getVar("table-row-active-background-color");
|
||||
color: getVar("table-row-active-color");
|
||||
|
||||
a,
|
||||
strong {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
border-color: getVar("table-row-active-color");
|
||||
color: currentColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thead {
|
||||
background-color: getVar("table-head-background-color");
|
||||
|
||||
td,
|
||||
th {
|
||||
border-width: getVar("table-head-cell-border-width");
|
||||
color: getVar("table-head-cell-color");
|
||||
}
|
||||
}
|
||||
|
||||
tfoot {
|
||||
background-color: getVar("table-foot-background-color");
|
||||
|
||||
td,
|
||||
th {
|
||||
border-width: getVar("table-foot-cell-border-width");
|
||||
color: getVar("table-foot-cell-color");
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
background-color: getVar("table-body-background-color");
|
||||
|
||||
tr {
|
||||
&:last-child {
|
||||
td,
|
||||
th {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.is-bordered {
|
||||
td,
|
||||
th {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
tr {
|
||||
&:last-child {
|
||||
td,
|
||||
th {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-fullwidth {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.is-hoverable {
|
||||
tbody {
|
||||
tr:not(.is-selected) {
|
||||
&:hover {
|
||||
background-color: getVar("table-row-hover-background-color");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-striped {
|
||||
tbody {
|
||||
tr:not(.is-selected) {
|
||||
&:hover {
|
||||
background-color: getVar("table-row-hover-background-color");
|
||||
|
||||
&:nth-child(even) {
|
||||
background-color: getVar(
|
||||
"table-striped-row-even-hover-background-color"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-narrow {
|
||||
td,
|
||||
th {
|
||||
padding: 0.25em 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-striped {
|
||||
tbody {
|
||||
tr:not(.is-selected) {
|
||||
&:nth-child(even) {
|
||||
background-color: getVar("table-striped-row-even-background-color");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}table-container {
|
||||
@extend %block;
|
||||
@include overflow-touch;
|
||||
overflow: auto;
|
||||
overflow-y: hidden;
|
||||
max-width: 100%;
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$tag-background-color: $background !default
|
||||
$tag-color: $text !default
|
||||
$tag-radius: $radius !default
|
||||
$tag-delete-margin: 1px !default
|
||||
|
||||
$tag-colors: $colors !default
|
||||
|
||||
.tags
|
||||
align-items: center
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
justify-content: flex-start
|
||||
.tag
|
||||
margin-bottom: 0.5rem
|
||||
&:not(:last-child)
|
||||
+ltr-property("margin", 0.5rem)
|
||||
&:last-child
|
||||
margin-bottom: -0.5rem
|
||||
&:not(:last-child)
|
||||
margin-bottom: 1rem
|
||||
// Sizes
|
||||
&.are-medium
|
||||
.tag:not(.is-normal):not(.is-large)
|
||||
font-size: $size-normal
|
||||
&.are-large
|
||||
.tag:not(.is-normal):not(.is-medium)
|
||||
font-size: $size-medium
|
||||
&.is-centered
|
||||
justify-content: center
|
||||
.tag
|
||||
margin-right: 0.25rem
|
||||
margin-left: 0.25rem
|
||||
&.is-right
|
||||
justify-content: flex-end
|
||||
.tag
|
||||
&:not(:first-child)
|
||||
margin-left: 0.5rem
|
||||
&:not(:last-child)
|
||||
margin-right: 0
|
||||
&.has-addons
|
||||
.tag
|
||||
+ltr-property("margin", 0)
|
||||
&:not(:first-child)
|
||||
+ltr-property("margin", 0, false)
|
||||
+ltr
|
||||
border-top-left-radius: 0
|
||||
border-bottom-left-radius: 0
|
||||
+rtl
|
||||
border-top-right-radius: 0
|
||||
border-bottom-right-radius: 0
|
||||
&:not(:last-child)
|
||||
+ltr
|
||||
border-top-right-radius: 0
|
||||
border-bottom-right-radius: 0
|
||||
+rtl
|
||||
border-top-left-radius: 0
|
||||
border-bottom-left-radius: 0
|
||||
|
||||
.tag:not(body)
|
||||
align-items: center
|
||||
background-color: $tag-background-color
|
||||
border-radius: $tag-radius
|
||||
color: $tag-color
|
||||
display: inline-flex
|
||||
font-size: $size-small
|
||||
height: 2em
|
||||
justify-content: center
|
||||
line-height: 1.5
|
||||
padding-left: 0.75em
|
||||
padding-right: 0.75em
|
||||
white-space: nowrap
|
||||
.delete
|
||||
+ltr-property("margin", 0.25rem, false)
|
||||
+ltr-property("margin", -0.375rem)
|
||||
// Colors
|
||||
@each $name, $pair in $tag-colors
|
||||
$color: nth($pair, 1)
|
||||
$color-invert: nth($pair, 2)
|
||||
&.is-#{$name}
|
||||
background-color: $color
|
||||
color: $color-invert
|
||||
// If a light and dark colors are provided
|
||||
@if length($pair) > 3
|
||||
$color-light: nth($pair, 3)
|
||||
$color-dark: nth($pair, 4)
|
||||
&.is-light
|
||||
background-color: $color-light
|
||||
color: $color-dark
|
||||
// Sizes
|
||||
&.is-normal
|
||||
font-size: $size-small
|
||||
&.is-medium
|
||||
font-size: $size-normal
|
||||
&.is-large
|
||||
font-size: $size-medium
|
||||
.icon
|
||||
&:first-child:not(:last-child)
|
||||
+ltr-property("margin", -0.375em, false)
|
||||
+ltr-property("margin", 0.1875em)
|
||||
&:last-child:not(:first-child)
|
||||
+ltr-property("margin", 0.1875em, false)
|
||||
+ltr-property("margin", -0.375em)
|
||||
&:first-child:last-child
|
||||
+ltr-property("margin", -0.375em, false)
|
||||
+ltr-property("margin", -0.375em)
|
||||
// Modifiers
|
||||
&.is-delete
|
||||
+ltr-property("margin", $tag-delete-margin, false)
|
||||
padding: 0
|
||||
position: relative
|
||||
width: 2em
|
||||
&::before,
|
||||
&::after
|
||||
background-color: currentColor
|
||||
content: ""
|
||||
display: block
|
||||
left: 50%
|
||||
position: absolute
|
||||
top: 50%
|
||||
transform: translateX(-50%) translateY(-50%) rotate(45deg)
|
||||
transform-origin: center center
|
||||
&::before
|
||||
height: 1px
|
||||
width: 50%
|
||||
&::after
|
||||
height: 50%
|
||||
width: 1px
|
||||
&:hover,
|
||||
&:focus
|
||||
background-color: darken($tag-background-color, 5%)
|
||||
&:active
|
||||
background-color: darken($tag-background-color, 10%)
|
||||
&.is-rounded
|
||||
border-radius: $radius-rounded
|
||||
|
||||
a.tag
|
||||
&:hover
|
||||
text-decoration: underline
|
230
sass/elements/tag.scss
Normal file
230
sass/elements/tag.scss
Normal file
|
@ -0,0 +1,230 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$tag-background-color: getVar("background") !default;
|
||||
$tag-color: getVar("text") !default;
|
||||
$tag-radius: getVar("radius") !default;
|
||||
$tag-delete-margin: 1px !default;
|
||||
|
||||
$tag-colors: $colors !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
tag-background-color: #{$tag-background-color},
|
||||
tag-color: #{$tag-color},
|
||||
tag-radius: #{$tag-radius},
|
||||
tag-delete-margin: #{$tag-delete-margin},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}tags {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.#{$class-prefix}tag {
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
&:not(:last-child) {
|
||||
@include ltr-property("margin", 0.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: -0.5rem;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.are-medium {
|
||||
.#{$class-prefix}tag:not(.is-normal):not(.is-large) {
|
||||
font-size: getVar("size-normal");
|
||||
}
|
||||
}
|
||||
|
||||
&.are-large {
|
||||
.#{$class-prefix}tag:not(.is-normal):not(.is-medium) {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
}
|
||||
|
||||
&.is-centered {
|
||||
justify-content: center;
|
||||
|
||||
.#{$class-prefix}tag {
|
||||
margin-right: 0.25rem;
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
justify-content: flex-end;
|
||||
|
||||
.#{$class-prefix}tag {
|
||||
&:not(:first-child) {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.has-addons {
|
||||
.#{$class-prefix}tag {
|
||||
@include ltr-property("margin", 0);
|
||||
|
||||
&:not(:first-child) {
|
||||
@include ltr-property("margin", 0, false);
|
||||
@include ltr {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
@include ltr {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
@include rtl {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}tag:not(body) {
|
||||
align-items: center;
|
||||
background-color: getVar("tag-background-color");
|
||||
border-radius: getVar("tag-radius");
|
||||
color: getVar("tag-color");
|
||||
display: inline-flex;
|
||||
font-size: getVar("size-small");
|
||||
height: 2em;
|
||||
justify-content: center;
|
||||
line-height: 1.5;
|
||||
padding-left: 0.75em;
|
||||
padding-right: 0.75em;
|
||||
white-space: nowrap;
|
||||
|
||||
.#{$class-prefix}delete {
|
||||
@include ltr-property("margin", 0.25rem, false);
|
||||
@include ltr-property("margin", -0.375rem);
|
||||
}
|
||||
|
||||
// Colors
|
||||
@each $name, $pair in $tag-colors {
|
||||
$color: nth($pair, 1);
|
||||
$color-invert: nth($pair, 2);
|
||||
|
||||
&.is-#{$name} {
|
||||
background-color: $color;
|
||||
color: $color-invert;
|
||||
|
||||
// If a light and dark colors are provided
|
||||
@if length($pair) > 3 {
|
||||
$color-light: nth($pair, 3);
|
||||
$color-dark: nth($pair, 4);
|
||||
|
||||
&.is-light {
|
||||
background-color: $color-light;
|
||||
color: $color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-normal {
|
||||
font-size: getVar("size-small");
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: getVar("size-normal");
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: getVar("size-medium");
|
||||
}
|
||||
|
||||
.#{$class-prefix}icon {
|
||||
&:first-child:not(:last-child) {
|
||||
@include ltr-property("margin", -0.375em, false);
|
||||
@include ltr-property("margin", 0.1875em);
|
||||
}
|
||||
|
||||
&:last-child:not(:first-child) {
|
||||
@include ltr-property("margin", 0.1875em, false);
|
||||
@include ltr-property("margin", -0.375em);
|
||||
}
|
||||
|
||||
&:first-child:last-child {
|
||||
@include ltr-property("margin", -0.375em, false);
|
||||
@include ltr-property("margin", -0.375em);
|
||||
}
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.is-delete {
|
||||
@include ltr-property("margin", getVar("tag-delete-margin"), false);
|
||||
padding: 0;
|
||||
position: relative;
|
||||
width: 2em;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
background-color: currentColor;
|
||||
content: "";
|
||||
display: block;
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateX(-50%) translateY(-50%) rotate(45deg);
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
&::before {
|
||||
height: 1px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
&::after {
|
||||
height: 50%;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
// background-color: darken($tag-background-color, 5%); // TODO
|
||||
}
|
||||
|
||||
&:active {
|
||||
// background-color: darken($tag-background-color, 10%); // TODO
|
||||
}
|
||||
}
|
||||
|
||||
&.is-rounded {
|
||||
border-radius: getVar("radius-rounded");
|
||||
}
|
||||
}
|
||||
|
||||
a.#{$class-prefix}tag {
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
@import "../utilities/mixins"
|
||||
|
||||
$title-color: $text-strong !default
|
||||
$title-family: false !default
|
||||
$title-size: $size-3 !default
|
||||
$title-weight: $weight-semibold !default
|
||||
$title-line-height: 1.125 !default
|
||||
$title-strong-color: inherit !default
|
||||
$title-strong-weight: inherit !default
|
||||
$title-sub-size: 0.75em !default
|
||||
$title-sup-size: 0.75em !default
|
||||
|
||||
$subtitle-color: $text !default
|
||||
$subtitle-family: false !default
|
||||
$subtitle-size: $size-5 !default
|
||||
$subtitle-weight: $weight-normal !default
|
||||
$subtitle-line-height: 1.25 !default
|
||||
$subtitle-strong-color: $text-strong !default
|
||||
$subtitle-strong-weight: $weight-semibold !default
|
||||
$subtitle-negative-margin: -1.25rem !default
|
||||
|
||||
.title,
|
||||
.subtitle
|
||||
@extend %block
|
||||
word-break: break-word
|
||||
em,
|
||||
span
|
||||
font-weight: inherit
|
||||
sub
|
||||
font-size: $title-sub-size
|
||||
sup
|
||||
font-size: $title-sup-size
|
||||
.tag
|
||||
vertical-align: middle
|
||||
|
||||
.title
|
||||
color: $title-color
|
||||
@if $title-family
|
||||
font-family: $title-family
|
||||
font-size: $title-size
|
||||
font-weight: $title-weight
|
||||
line-height: $title-line-height
|
||||
strong
|
||||
color: $title-strong-color
|
||||
font-weight: $title-strong-weight
|
||||
&:not(.is-spaced) + .subtitle
|
||||
margin-top: $subtitle-negative-margin
|
||||
// Sizes
|
||||
@each $size in $sizes
|
||||
$i: index($sizes, $size)
|
||||
&.is-#{$i}
|
||||
font-size: $size
|
||||
|
||||
.subtitle
|
||||
color: $subtitle-color
|
||||
@if $subtitle-family
|
||||
font-family: $subtitle-family
|
||||
font-size: $subtitle-size
|
||||
font-weight: $subtitle-weight
|
||||
line-height: $subtitle-line-height
|
||||
strong
|
||||
color: $subtitle-strong-color
|
||||
font-weight: $subtitle-strong-weight
|
||||
&:not(.is-spaced) + .title
|
||||
margin-top: $subtitle-negative-margin
|
||||
// Sizes
|
||||
@each $size in $sizes
|
||||
$i: index($sizes, $size)
|
||||
&.is-#{$i}
|
||||
font-size: $size
|
128
sass/elements/title.scss
Normal file
128
sass/elements/title.scss
Normal file
|
@ -0,0 +1,128 @@
|
|||
@import "../utilities/mixins";
|
||||
|
||||
$title-color: getVar("text-strong") !default;
|
||||
$title-family: false !default;
|
||||
$title-size: getVar("size-3") !default;
|
||||
$title-weight: getVar("weight-semibold") !default;
|
||||
$title-line-height: 1.125 !default;
|
||||
$title-strong-color: inherit !default;
|
||||
$title-strong-weight: inherit !default;
|
||||
$title-sub-size: 0.75em !default;
|
||||
$title-sup-size: 0.75em !default;
|
||||
|
||||
$subtitle-color: getVar("text") !default;
|
||||
$subtitle-family: false !default;
|
||||
$subtitle-size: getVar("size-5") !default;
|
||||
$subtitle-weight: getVar("weight-normal") !default;
|
||||
$subtitle-line-height: 1.25 !default;
|
||||
$subtitle-strong-color: getVar("text-strong") !default;
|
||||
$subtitle-strong-weight: getVar("weight-semibold") !default;
|
||||
$subtitle-negative-margin: -1.25rem !default;
|
||||
|
||||
:root {
|
||||
@include register-vars(
|
||||
(
|
||||
title-color: #{$title-color},
|
||||
title-family: #{$title-family},
|
||||
title-size: #{$title-size},
|
||||
title-weight: #{$title-weight},
|
||||
title-line-height: #{$title-line-height},
|
||||
title-strong-color: #{$title-strong-color},
|
||||
title-strong-weight: #{$title-strong-weight},
|
||||
title-sub-size: #{$title-sub-size},
|
||||
title-sup-size: #{$title-sup-size},
|
||||
subtitle-color: #{$subtitle-color},
|
||||
subtitle-family: #{$subtitle-family},
|
||||
subtitle-size: #{$subtitle-size},
|
||||
subtitle-weight: #{$subtitle-weight},
|
||||
subtitle-line-height: #{$subtitle-line-height},
|
||||
subtitle-strong-color: #{$subtitle-strong-color},
|
||||
subtitle-strong-weight: #{$subtitle-strong-weight},
|
||||
subtitle-negative-margin: #{$subtitle-negative-margin},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
.#{$class-prefix}title,
|
||||
.#{$class-prefix}subtitle {
|
||||
@extend %block;
|
||||
|
||||
word-break: break-word;
|
||||
|
||||
em,
|
||||
span {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
sub {
|
||||
font-size: getVar("title-sub-size");
|
||||
}
|
||||
|
||||
sup {
|
||||
font-size: getVar("title-sup-size");
|
||||
}
|
||||
|
||||
.#{$class-prefix}tag {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}title {
|
||||
color: getVar("title-color");
|
||||
|
||||
@if $title-family {
|
||||
font-family: getVar("title-family");
|
||||
}
|
||||
|
||||
font-size: getVar("title-size");
|
||||
font-weight: getVar("title-weight");
|
||||
line-height: getVar("title-line-height");
|
||||
|
||||
strong {
|
||||
color: getVar("title-strong-color");
|
||||
font-weight: getVar("title-strong-weight");
|
||||
}
|
||||
|
||||
&:not(.is-spaced) + .#{$class-prefix}subtitle {
|
||||
margin-top: getVar("subtitle-negative-margin");
|
||||
}
|
||||
|
||||
// Sizes
|
||||
@each $size in $sizes {
|
||||
$i: index($sizes, $size);
|
||||
|
||||
&.is-#{$i} {
|
||||
font-size: getVar("size-", "", $i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}subtitle {
|
||||
color: getVar("subtitle-color");
|
||||
|
||||
@if $subtitle-family {
|
||||
font-family: getVar("subtitle-family");
|
||||
}
|
||||
|
||||
font-size: getVar("subtitle-size");
|
||||
font-weight: getVar("subtitle-weight");
|
||||
line-height: getVar("subtitle-line-height");
|
||||
|
||||
strong {
|
||||
color: getVar("subtitle-strong-color");
|
||||
font-weight: getVar("subtitle-strong-weight");
|
||||
}
|
||||
|
||||
&:not(.is-spaced) + .#{$class-prefix}title {
|
||||
margin-top: getVar("subtitle-negative-margin");
|
||||
}
|
||||
|
||||
// Sizes
|
||||
@each $size in $sizes {
|
||||
$i: index($sizes, $size);
|
||||
|
||||
&.is-#{$i} {
|
||||
font-size: getVar("size-", "", $i);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
/* Bulma Form */
|
||||
@charset "utf-8"
|
||||
|
||||
@import "shared"
|
||||
@import "input-textarea"
|
||||
@import "checkbox-radio"
|
||||
@import "select"
|
||||
@import "file"
|
||||
@import "tools"
|
9
sass/form/_all.scss
Normal file
9
sass/form/_all.scss
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* Bulma Form */
|
||||
@charset "utf-8";
|
||||
|
||||
@import "shared";
|
||||
@import "input-textarea";
|
||||
@import "checkbox-radio";
|
||||
@import "select";
|
||||
@import "file";
|
||||
@import "tools";
|
|
@ -1,22 +0,0 @@
|
|||
%checkbox-radio
|
||||
cursor: pointer
|
||||
display: inline-block
|
||||
line-height: 1.25
|
||||
position: relative
|
||||
input
|
||||
cursor: pointer
|
||||
&:hover
|
||||
color: $input-hover-color
|
||||
&[disabled],
|
||||
fieldset[disabled] &,
|
||||
input[disabled]
|
||||
color: $input-disabled-color
|
||||
cursor: not-allowed
|
||||
|
||||
.checkbox
|
||||
@extend %checkbox-radio
|
||||
|
||||
.radio
|
||||
@extend %checkbox-radio
|
||||
& + .radio
|
||||
+ltr-property("margin", 0.5em, false)
|
33
sass/form/checkbox-radio.scss
Normal file
33
sass/form/checkbox-radio.scss
Normal file
|
@ -0,0 +1,33 @@
|
|||
%checkbox-radio {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
line-height: 1.25;
|
||||
position: relative;
|
||||
|
||||
input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $input-hover-color;
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
fieldset[disabled] &,
|
||||
input[disabled] {
|
||||
color: $input-disabled-color;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}checkbox {
|
||||
@extend %checkbox-radio;
|
||||
}
|
||||
|
||||
.#{$class-prefix}radio {
|
||||
@extend %checkbox-radio;
|
||||
|
||||
& + .#{$class-prefix}radio {
|
||||
@include ltr-property("margin", 0.5em, false);
|
||||
}
|
||||
}
|
|
@ -1,184 +0,0 @@
|
|||
$file-border-color: $border !default
|
||||
$file-radius: $radius !default
|
||||
|
||||
$file-cta-background-color: $scheme-main-ter !default
|
||||
$file-cta-color: $text !default
|
||||
$file-cta-hover-color: $text-strong !default
|
||||
$file-cta-active-color: $text-strong !default
|
||||
|
||||
$file-name-border-color: $border !default
|
||||
$file-name-border-style: solid !default
|
||||
$file-name-border-width: 1px 1px 1px 0 !default
|
||||
$file-name-max-width: 16em !default
|
||||
|
||||
$file-colors: $form-colors !default
|
||||
|
||||
.file
|
||||
@extend %unselectable
|
||||
align-items: stretch
|
||||
display: flex
|
||||
justify-content: flex-start
|
||||
position: relative
|
||||
// Colors
|
||||
@each $name, $pair in $file-colors
|
||||
$color: nth($pair, 1)
|
||||
$color-invert: nth($pair, 2)
|
||||
&.is-#{$name}
|
||||
.file-cta
|
||||
background-color: $color
|
||||
border-color: transparent
|
||||
color: $color-invert
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
.file-cta
|
||||
background-color: bulmaDarken($color, 2.5%)
|
||||
border-color: transparent
|
||||
color: $color-invert
|
||||
&:focus,
|
||||
&.is-focused
|
||||
.file-cta
|
||||
border-color: transparent
|
||||
box-shadow: 0 0 0.5em bulmaRgba($color, 0.25)
|
||||
color: $color-invert
|
||||
&:active,
|
||||
&.is-active
|
||||
.file-cta
|
||||
background-color: bulmaDarken($color, 5%)
|
||||
border-color: transparent
|
||||
color: $color-invert
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
&.is-normal
|
||||
font-size: $size-normal
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
.file-icon
|
||||
.fa
|
||||
font-size: 21px
|
||||
&.is-large
|
||||
font-size: $size-large
|
||||
.file-icon
|
||||
.fa
|
||||
font-size: 28px
|
||||
// Modifiers
|
||||
&.has-name
|
||||
.file-cta
|
||||
border-bottom-right-radius: 0
|
||||
border-top-right-radius: 0
|
||||
.file-name
|
||||
border-bottom-left-radius: 0
|
||||
border-top-left-radius: 0
|
||||
&.is-empty
|
||||
.file-cta
|
||||
border-radius: $file-radius
|
||||
.file-name
|
||||
display: none
|
||||
&.is-boxed
|
||||
.file-label
|
||||
flex-direction: column
|
||||
.file-cta
|
||||
flex-direction: column
|
||||
height: auto
|
||||
padding: 1em 3em
|
||||
.file-name
|
||||
border-width: 0 1px 1px
|
||||
.file-icon
|
||||
height: 1.5em
|
||||
width: 1.5em
|
||||
.fa
|
||||
font-size: 21px
|
||||
&.is-small
|
||||
.file-icon .fa
|
||||
font-size: 14px
|
||||
&.is-medium
|
||||
.file-icon .fa
|
||||
font-size: 28px
|
||||
&.is-large
|
||||
.file-icon .fa
|
||||
font-size: 35px
|
||||
&.has-name
|
||||
.file-cta
|
||||
border-radius: $file-radius $file-radius 0 0
|
||||
.file-name
|
||||
border-radius: 0 0 $file-radius $file-radius
|
||||
border-width: 0 1px 1px
|
||||
&.is-centered
|
||||
justify-content: center
|
||||
&.is-fullwidth
|
||||
.file-label
|
||||
width: 100%
|
||||
.file-name
|
||||
flex-grow: 1
|
||||
max-width: none
|
||||
&.is-right
|
||||
justify-content: flex-end
|
||||
.file-cta
|
||||
border-radius: 0 $file-radius $file-radius 0
|
||||
.file-name
|
||||
border-radius: $file-radius 0 0 $file-radius
|
||||
border-width: 1px 0 1px 1px
|
||||
order: -1
|
||||
|
||||
.file-label
|
||||
align-items: stretch
|
||||
display: flex
|
||||
cursor: pointer
|
||||
justify-content: flex-start
|
||||
overflow: hidden
|
||||
position: relative
|
||||
&:hover
|
||||
.file-cta
|
||||
background-color: bulmaDarken($file-cta-background-color, 2.5%)
|
||||
color: $file-cta-hover-color
|
||||
.file-name
|
||||
border-color: bulmaDarken($file-name-border-color, 2.5%)
|
||||
&:active
|
||||
.file-cta
|
||||
background-color: bulmaDarken($file-cta-background-color, 5%)
|
||||
color: $file-cta-active-color
|
||||
.file-name
|
||||
border-color: bulmaDarken($file-name-border-color, 5%)
|
||||
|
||||
.file-input
|
||||
height: 100%
|
||||
left: 0
|
||||
opacity: 0
|
||||
outline: none
|
||||
position: absolute
|
||||
top: 0
|
||||
width: 100%
|
||||
|
||||
.file-cta,
|
||||
.file-name
|
||||
@extend %control
|
||||
border-color: $file-border-color
|
||||
border-radius: $file-radius
|
||||
font-size: 1em
|
||||
padding-left: 1em
|
||||
padding-right: 1em
|
||||
white-space: nowrap
|
||||
|
||||
.file-cta
|
||||
background-color: $file-cta-background-color
|
||||
color: $file-cta-color
|
||||
|
||||
.file-name
|
||||
border-color: $file-name-border-color
|
||||
border-style: $file-name-border-style
|
||||
border-width: $file-name-border-width
|
||||
display: block
|
||||
max-width: $file-name-max-width
|
||||
overflow: hidden
|
||||
text-align: inherit
|
||||
text-overflow: ellipsis
|
||||
|
||||
.file-icon
|
||||
align-items: center
|
||||
display: flex
|
||||
height: 1em
|
||||
justify-content: center
|
||||
+ltr-property("margin", 0.5em)
|
||||
width: 1em
|
||||
.fa
|
||||
font-size: 14px
|
283
sass/form/file.scss
Normal file
283
sass/form/file.scss
Normal file
|
@ -0,0 +1,283 @@
|
|||
$file-border-color: $border !default;
|
||||
$file-radius: $radius !default;
|
||||
|
||||
$file-cta-background-color: $scheme-main-ter !default;
|
||||
$file-cta-color: $text !default;
|
||||
$file-cta-hover-color: $text-strong !default;
|
||||
$file-cta-active-color: $text-strong !default;
|
||||
|
||||
$file-name-border-color: $border !default;
|
||||
$file-name-border-style: solid !default;
|
||||
$file-name-border-width: 1px 1px 1px 0 !default;
|
||||
$file-name-max-width: 16em !default;
|
||||
|
||||
$file-colors: $form-colors !default;
|
||||
|
||||
.#{$class-prefix}file {
|
||||
@extend %unselectable;
|
||||
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
position: relative;
|
||||
|
||||
// Colors
|
||||
@each $name, $pair in $file-colors {
|
||||
$color: nth($pair, 1);
|
||||
$color-invert: nth($pair, 2);
|
||||
|
||||
&.is-#{$name} {
|
||||
.#{$class-prefix}file-cta {
|
||||
background-color: $color;
|
||||
border-color: transparent;
|
||||
color: $color-invert;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.is-hovered {
|
||||
.#{$class-prefix}file-cta {
|
||||
background-color: bulmaDarken($color, 2.5%);
|
||||
border-color: transparent;
|
||||
color: $color-invert;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.is-focused {
|
||||
.#{$class-prefix}file-cta {
|
||||
border-color: transparent;
|
||||
box-shadow: 0 0 0.5em bulmaRgba($color, 0.25);
|
||||
color: $color-invert;
|
||||
}
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.is-active {
|
||||
.#{$class-prefix}file-cta {
|
||||
background-color: bulmaDarken($color, 5%);
|
||||
border-color: transparent;
|
||||
color: $color-invert;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
font-size: $size-small;
|
||||
}
|
||||
|
||||
&.is-normal {
|
||||
font-size: $size-normal;
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
font-size: $size-medium;
|
||||
|
||||
.#{$class-prefix}file-icon {
|
||||
.fa {
|
||||
font-size: 21px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
font-size: $size-large;
|
||||
|
||||
.#{$class-prefix}file-icon {
|
||||
.fa {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.has-name {
|
||||
.#{$class-prefix}file-cta {
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
border-bottom-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
&.is-empty {
|
||||
.#{$class-prefix}file-cta {
|
||||
border-radius: $file-radius;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-boxed {
|
||||
.#{$class-prefix}file-label {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-cta {
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
padding: 1em 3em;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
border-width: 0 1px 1px;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-icon {
|
||||
height: 1.5em;
|
||||
width: 1.5em;
|
||||
|
||||
.fa {
|
||||
font-size: 21px;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-small {
|
||||
.#{$class-prefix}file-icon .fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
.#{$class-prefix}file-icon .fa {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
.#{$class-prefix}file-icon .fa {
|
||||
font-size: 35px;
|
||||
}
|
||||
}
|
||||
|
||||
&.has-name {
|
||||
.#{$class-prefix}file-cta {
|
||||
border-radius: $file-radius $file-radius 0 0;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
border-radius: 0 0 $file-radius $file-radius;
|
||||
border-width: 0 1px 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-centered {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&.is-fullwidth {
|
||||
.#{$class-prefix}file-label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
flex-grow: 1;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-right {
|
||||
justify-content: flex-end;
|
||||
|
||||
.#{$class-prefix}file-cta {
|
||||
border-radius: 0 $file-radius $file-radius 0;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
border-radius: $file-radius 0 0 $file-radius;
|
||||
border-width: 1px 0 1px 1px;
|
||||
order: -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-label {
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
justify-content: flex-start;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
.#{$class-prefix}file-cta {
|
||||
background-color: bulmaDarken($file-cta-background-color, 2.5%);
|
||||
color: $file-cta-hover-color;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
border-color: bulmaDarken($file-name-border-color, 2.5%);
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
.#{$class-prefix}file-cta {
|
||||
background-color: bulmaDarken($file-cta-background-color, 5%);
|
||||
color: $file-cta-active-color;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
border-color: bulmaDarken($file-name-border-color, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-input {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
outline: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-cta,
|
||||
.#{$class-prefix}file-name {
|
||||
@extend %control;
|
||||
|
||||
border-color: $file-border-color;
|
||||
border-radius: $file-radius;
|
||||
font-size: 1em;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-cta {
|
||||
background-color: $file-cta-background-color;
|
||||
color: $file-cta-color;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-name {
|
||||
border-color: $file-name-border-color;
|
||||
border-style: $file-name-border-style;
|
||||
border-width: $file-name-border-width;
|
||||
display: block;
|
||||
max-width: $file-name-max-width;
|
||||
overflow: hidden;
|
||||
text-align: inherit;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.#{$class-prefix}file-icon {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
height: 1em;
|
||||
justify-content: center;
|
||||
|
||||
@include ltr-property("margin", 0.5em);
|
||||
|
||||
width: 1em;
|
||||
|
||||
.fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
$textarea-padding: $control-padding-horizontal !default
|
||||
$textarea-max-height: 40em !default
|
||||
$textarea-min-height: 8em !default
|
||||
|
||||
$textarea-colors: $form-colors !default
|
||||
|
||||
%input-textarea
|
||||
@extend %input
|
||||
box-shadow: $input-shadow
|
||||
max-width: 100%
|
||||
width: 100%
|
||||
&[readonly]
|
||||
box-shadow: none
|
||||
// Colors
|
||||
@each $name, $pair in $textarea-colors
|
||||
$color: nth($pair, 1)
|
||||
&.is-#{$name}
|
||||
border-color: $color
|
||||
&:focus,
|
||||
&.is-focused,
|
||||
&:active,
|
||||
&.is-active
|
||||
box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25)
|
||||
// Sizes
|
||||
&.is-small
|
||||
+control-small
|
||||
&.is-medium
|
||||
+control-medium
|
||||
&.is-large
|
||||
+control-large
|
||||
// Modifiers
|
||||
&.is-fullwidth
|
||||
display: block
|
||||
width: 100%
|
||||
&.is-inline
|
||||
display: inline
|
||||
width: auto
|
||||
|
||||
.input
|
||||
@extend %input-textarea
|
||||
&.is-rounded
|
||||
border-radius: $radius-rounded
|
||||
padding-left: calc(#{$control-padding-horizontal} + 0.375em)
|
||||
padding-right: calc(#{$control-padding-horizontal} + 0.375em)
|
||||
&.is-static
|
||||
background-color: transparent
|
||||
border-color: transparent
|
||||
box-shadow: none
|
||||
padding-left: 0
|
||||
padding-right: 0
|
||||
|
||||
.textarea
|
||||
@extend %input-textarea
|
||||
display: block
|
||||
max-width: 100%
|
||||
min-width: 100%
|
||||
padding: $textarea-padding
|
||||
resize: vertical
|
||||
&:not([rows])
|
||||
max-height: $textarea-max-height
|
||||
min-height: $textarea-min-height
|
||||
&[rows]
|
||||
height: initial
|
||||
// Modifiers
|
||||
&.has-fixed-size
|
||||
resize: none
|
99
sass/form/input-textarea.scss
Normal file
99
sass/form/input-textarea.scss
Normal file
|
@ -0,0 +1,99 @@
|
|||
$textarea-padding: $control-padding-horizontal !default;
|
||||
$textarea-max-height: 40em !default;
|
||||
$textarea-min-height: 8em !default;
|
||||
|
||||
$textarea-colors: $form-colors !default;
|
||||
|
||||
%input-textarea {
|
||||
@extend %input;
|
||||
|
||||
box-shadow: $input-shadow;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
|
||||
&[readonly] {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
// Colors
|
||||
@each $name, $pair in $textarea-colors {
|
||||
$color: nth($pair, 1);
|
||||
|
||||
&.is-#{$name} {
|
||||
border-color: $color;
|
||||
|
||||
&:focus,
|
||||
&.is-focused,
|
||||
&:active,
|
||||
&.is-active {
|
||||
box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.is-small {
|
||||
@include control-small;
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
@include control-medium;
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
@include control-large;
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.is-fullwidth {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.is-inline {
|
||||
display: inline;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}input {
|
||||
@extend %input-textarea;
|
||||
|
||||
&.is-rounded {
|
||||
border-radius: $radius-rounded;
|
||||
padding-left: calc(#{$control-padding-horizontal} + 0.375em);
|
||||
padding-right: calc(#{$control-padding-horizontal} + 0.375em);
|
||||
}
|
||||
|
||||
&.is-static {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$class-prefix}textarea {
|
||||
@extend %input-textarea;
|
||||
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
min-width: 100%;
|
||||
padding: $textarea-padding;
|
||||
resize: vertical;
|
||||
|
||||
&:not([rows]) {
|
||||
max-height: $textarea-max-height;
|
||||
min-height: $textarea-min-height;
|
||||
}
|
||||
|
||||
&[rows] {
|
||||
height: initial;
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
&.has-fixed-size {
|
||||
resize: none;
|
||||
}
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
$select-colors: $form-colors !default
|
||||
|
||||
.select
|
||||
display: inline-block
|
||||
max-width: 100%
|
||||
position: relative
|
||||
vertical-align: top
|
||||
&:not(.is-multiple)
|
||||
height: $input-height
|
||||
&:not(.is-multiple):not(.is-loading)
|
||||
&::after
|
||||
@extend %arrow
|
||||
border-color: $input-arrow
|
||||
+ltr-position(1.125em)
|
||||
z-index: 4
|
||||
&.is-rounded
|
||||
select
|
||||
border-radius: $radius-rounded
|
||||
+ltr-property("padding", 1em, false)
|
||||
select
|
||||
@extend %input
|
||||
cursor: pointer
|
||||
display: block
|
||||
font-size: 1em
|
||||
max-width: 100%
|
||||
outline: none
|
||||
&::-ms-expand
|
||||
display: none
|
||||
&[disabled]:hover,
|
||||
fieldset[disabled] &:hover
|
||||
border-color: $input-disabled-border-color
|
||||
&:not([multiple])
|
||||
+ltr-property("padding", 2.5em)
|
||||
&[multiple]
|
||||
height: auto
|
||||
padding: 0
|
||||
option
|
||||
padding: 0.5em 1em
|
||||
// States
|
||||
&:not(.is-multiple):not(.is-loading):hover
|
||||
&::after
|
||||
border-color: $input-hover-color
|
||||
// Colors
|
||||
@each $name, $pair in $select-colors
|
||||
$color: nth($pair, 1)
|
||||
&.is-#{$name}
|
||||
&:not(:hover)::after
|
||||
border-color: $color
|
||||
select
|
||||
border-color: $color
|
||||
&:hover,
|
||||
&.is-hovered
|
||||
border-color: bulmaDarken($color, 5%)
|
||||
&:focus,
|
||||
&.is-focused,
|
||||
&:active,
|
||||
&.is-active
|
||||
box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25)
|
||||
// Sizes
|
||||
&.is-small
|
||||
+control-small
|
||||
&.is-medium
|
||||
+control-medium
|
||||
&.is-large
|
||||
+control-large
|
||||
// Modifiers
|
||||
&.is-disabled
|
||||
&::after
|
||||
border-color: $input-disabled-color !important
|
||||
opacity: 0.5
|
||||
&.is-fullwidth
|
||||
width: 100%
|
||||
select
|
||||
width: 100%
|
||||
&.is-loading
|
||||
&::after
|
||||
@extend %loader
|
||||
margin-top: 0
|
||||
position: absolute
|
||||
+ltr-position(0.625em)
|
||||
top: 0.625em
|
||||
transform: none
|
||||
&.is-small:after
|
||||
font-size: $size-small
|
||||
&.is-medium:after
|
||||
font-size: $size-medium
|
||||
&.is-large:after
|
||||
font-size: $size-large
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue