spaCy/website/assets/css/_base/_utilities.sass

268 lines
4.6 KiB
Sass
Raw Normal View History

2016-10-31 21:04:15 +03:00
//- 💫 CSS > BASE > UTILITIES
2016-10-03 21:19:13 +03:00
//- Text
2017-10-03 15:14:52 +03:00
.u-text,
.u-text-small,
.u-text-tiny
font-family: $font-primary
2016-10-31 21:04:15 +03:00
.u-text
2017-10-03 15:14:52 +03:00
font-size: 1.35rem
line-height: 1.5
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
.u-text-small
2017-10-03 15:14:52 +03:00
font-size: 1.3rem
line-height: 1.375
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
.u-text-tiny
2017-10-03 15:14:52 +03:00
font-size: 1.1rem
line-height: 1.375
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
//- Labels & Tags
2016-10-03 21:19:13 +03:00
.u-text-label
2017-10-03 15:14:52 +03:00
font: normal 600 1.4rem/#{1.5} $font-secondary
2016-10-03 21:19:13 +03:00
text-transform: uppercase
2017-10-03 15:14:52 +03:00
&.u-text-label--light,
2016-10-31 21:04:15 +03:00
&.u-text-label--dark
display: inline-block
2017-10-03 15:14:52 +03:00
border-radius: 1em
padding: 0 1rem 0.15rem
&.u-text-label--dark
2016-10-31 21:04:15 +03:00
background: $color-dark
box-shadow: inset 1px 1px 1px rgba($color-front, 0.25)
color: $color-back
margin: 1.5rem 0 0 2rem
2017-10-03 15:14:52 +03:00
&.u-text-label--light
background: $color-back
color: $color-theme
margin-bottom: 1rem
2016-10-31 21:04:15 +03:00
.u-text-tag
display: inline-block
2017-10-03 15:14:52 +03:00
font: 600 1.1rem/#{1} $font-secondary
2016-10-31 21:04:15 +03:00
background: $color-theme
color: $color-back
2017-11-01 04:04:00 +03:00
padding: 2px 6px 4px
2017-10-03 15:14:52 +03:00
border-radius: 1em
2016-10-31 21:04:15 +03:00
text-transform: uppercase
vertical-align: middle
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
&.u-text-tag--spaced
margin-left: 0.75em
margin-right: 0.5em
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
//- Headings
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
.u-heading
2017-10-03 15:14:52 +03:00
margin-bottom: 1em
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
@include breakpoint(max, md)
word-wrap: break-word
&:not(:first-child)
padding-top: 3.5rem
2016-10-03 21:19:13 +03:00
2017-10-03 15:14:52 +03:00
&.u-heading--title:after
content: ""
display: block
width: 10%
min-width: 6rem
height: 6px
background: $color-theme
margin-top: 3rem
2016-10-03 21:19:13 +03:00
.u-heading-0
2017-10-03 15:14:52 +03:00
font: normal 600 7rem/#{1} $font-secondary
@include breakpoint(max, sm)
font-size: 6rem
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
@each $level, $size in $headings
2016-10-03 21:19:13 +03:00
.u-heading-#{$level}
2017-10-03 15:14:52 +03:00
font: normal 500 #{$size}rem/#{1.1} $font-secondary
.u-heading__teaser
margin-top: 2rem
font-weight: normal
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
//- Links
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
.u-link
color: $color-theme
border-bottom: 1px solid
2017-10-03 15:14:52 +03:00
transition: color 0.2s ease
&:hover
color: $color-theme-dark
💫 Interactive code examples, spaCy Universe and various docs improvements (#2274) * Integrate Python kernel via Binder * Add live model test for languages with examples * Update docs and code examples * Adjust margin (if not bootstrapped) * Add binder version to global config * Update terminal and executable code mixins * Pass attributes through infobox and section * Hide v-cloak * Fix example * Take out model comparison for now * Add meta text for compat * Remove chart.js dependency * Tidy up and simplify JS and port big components over to Vue * Remove chartjs example * Add Twitter icon * Add purple stylesheet option * Add utility for hand cursor (special cases only) * Add transition classes * Add small option for section * Add thumb object for small round thumbnail images * Allow unset code block language via "none" value (workaround to still allow unset language to default to DEFAULT_SYNTAX) * Pass through attributes * Add syntax highlighting definitions for Julia, R and Docker * Add website icon * Remove user survey from navigation * Don't hide GitHub icon on small screens * Make top navigation scrollable on small screens * Remove old resources page and references to it * Add Universe * Add helper functions for better page URL and title * Update site description * Increment versions * Update preview images * Update mentions of resources * Fix image * Fix social images * Fix problem with cover sizing and floats * Add divider and move badges into heading * Add docstrings * Reference converting section * Add section on converting word vectors * Move converting section to custom section and fix formatting * Remove old fastText example * Move extensions content to own section Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary) * Use better component example and add factories section * Add note on larger model * Use better example for non-vector * Remove similarity in context section Only works via small models with tensors so has always been kind of confusing * Add note on init-model command * Fix lightning tour examples and make excutable if possible * Add spacy train CLI section to train * Fix formatting and add video * Fix formatting * Fix textcat example description (resolves #2246) * Add dummy file to try resolve conflict * Delete dummy file * Tidy up [ci skip] * Ensure sufficient height of loading container * Add loading animation to universe * Update Thebelab build and use better startup message * Fix asset versioning * Fix typo [ci skip] * Add note on project idea label
2018-04-29 03:06:46 +03:00
.u-hand
cursor: pointer
2017-10-03 15:14:52 +03:00
.u-hide-link.u-hide-link
border: none
color: inherit
&:hover
color: inherit
2016-10-03 21:19:13 +03:00
.u-permalink
position: relative
2017-10-03 15:14:52 +03:00
&:before
content: "\00b6"
font-size: 0.9em
font-weight: normal
color: $color-subtle
@include position(absolute, top, left, 0.15em, -2.85rem)
opacity: 0
transition: opacity 0.2s ease
&:hover:before
opacity: 1
&:active:before
color: $color-theme
2016-10-03 21:19:13 +03:00
&:target
display: inline-block
2017-10-03 15:14:52 +03:00
&:before
bottom: 0.15em
top: initial
2016-10-03 21:19:13 +03:00
2017-10-03 15:14:52 +03:00
[id]:target
padding-top: $nav-height * 1.25
2016-10-03 21:19:13 +03:00
//- Layout
.u-width-full
width: 100%
2017-10-03 15:14:52 +03:00
.u-float-left
float: left
margin-right: 1rem
.u-float-right
float: right
margin-left: 1rem
2016-10-03 21:19:13 +03:00
.u-text-center
text-align: center
2016-10-31 21:04:15 +03:00
.u-text-right
text-align: right
.u-padding
padding: 5rem
2016-10-03 21:19:13 +03:00
.u-padding-small
padding: 0.5em 0.75em
.u-padding-medium
2017-10-03 15:14:52 +03:00
padding: 1.8rem
2016-10-03 21:19:13 +03:00
.u-padding-top
padding-top: 2rem
2016-10-31 21:04:15 +03:00
.u-inline-block
display: inline-block
2017-10-03 15:14:52 +03:00
.u-flex-full
flex: 1
2016-12-18 19:40:30 +03:00
.u-nowrap
white-space: nowrap
2017-10-03 15:14:52 +03:00
.u-wrap
white-space: pre-wrap
.u-break.u-break
word-wrap: break-word
white-space: initial
&.u-break--all
word-break: break-all
2016-10-31 21:04:15 +03:00
.u-no-border
border: none
2016-10-03 21:19:13 +03:00
.u-border
border: 1px solid $color-subtle
2016-10-31 21:04:15 +03:00
border-radius: 2px
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
.u-border-dotted
2017-10-03 15:14:52 +03:00
border-bottom: 1px dotted $color-subtle
2016-10-03 21:19:13 +03:00
2017-10-03 15:14:52 +03:00
@each $name, $color in (theme: $color-theme, dark: $color-dark, subtle: $color-subtle-dark, light: $color-back, red: $color-red, green: $color-green, yellow: $color-yellow)
2016-10-31 21:04:15 +03:00
.u-color-#{$name}
color: $color
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
.u-grayscale
filter: grayscale(100%)
transition: filter 0.15s ease
user-select: none
&:hover
filter: none
2016-10-03 21:19:13 +03:00
.u-pattern
2016-10-31 21:04:15 +03:00
background: $pattern
2016-10-03 21:19:13 +03:00
2017-10-03 15:14:52 +03:00
//- Loaders
.u-loading,
[data-loading]
$spinner-size: 75px
$spinner-bar: 8px
💫 Interactive code examples, spaCy Universe and various docs improvements (#2274) * Integrate Python kernel via Binder * Add live model test for languages with examples * Update docs and code examples * Adjust margin (if not bootstrapped) * Add binder version to global config * Update terminal and executable code mixins * Pass attributes through infobox and section * Hide v-cloak * Fix example * Take out model comparison for now * Add meta text for compat * Remove chart.js dependency * Tidy up and simplify JS and port big components over to Vue * Remove chartjs example * Add Twitter icon * Add purple stylesheet option * Add utility for hand cursor (special cases only) * Add transition classes * Add small option for section * Add thumb object for small round thumbnail images * Allow unset code block language via "none" value (workaround to still allow unset language to default to DEFAULT_SYNTAX) * Pass through attributes * Add syntax highlighting definitions for Julia, R and Docker * Add website icon * Remove user survey from navigation * Don't hide GitHub icon on small screens * Make top navigation scrollable on small screens * Remove old resources page and references to it * Add Universe * Add helper functions for better page URL and title * Update site description * Increment versions * Update preview images * Update mentions of resources * Fix image * Fix social images * Fix problem with cover sizing and floats * Add divider and move badges into heading * Add docstrings * Reference converting section * Add section on converting word vectors * Move converting section to custom section and fix formatting * Remove old fastText example * Move extensions content to own section Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary) * Use better component example and add factories section * Add note on larger model * Use better example for non-vector * Remove similarity in context section Only works via small models with tensors so has always been kind of confusing * Add note on init-model command * Fix lightning tour examples and make excutable if possible * Add spacy train CLI section to train * Fix formatting and add video * Fix formatting * Fix textcat example description (resolves #2246) * Add dummy file to try resolve conflict * Delete dummy file * Tidy up [ci skip] * Ensure sufficient height of loading container * Add loading animation to universe * Update Thebelab build and use better startup message * Fix asset versioning * Fix typo [ci skip] * Add note on project idea label
2018-04-29 03:06:46 +03:00
min-height: $spinner-size * 2
2017-10-03 15:14:52 +03:00
position: relative
& > *
opacity: 0.35
&:before
@include position(absolute, top, left, 0, 0)
@include size($spinner-size)
right: 0
bottom: 0
margin: auto
content: ""
border: $spinner-bar solid $color-subtle
border-right: $spinner-bar solid $color-theme
border-radius: 50%
animation: rotate 1s linear infinite
z-index: 10
2016-10-31 21:04:15 +03:00
//- Hidden elements
2016-10-03 21:19:13 +03:00
💫 Interactive code examples, spaCy Universe and various docs improvements (#2274) * Integrate Python kernel via Binder * Add live model test for languages with examples * Update docs and code examples * Adjust margin (if not bootstrapped) * Add binder version to global config * Update terminal and executable code mixins * Pass attributes through infobox and section * Hide v-cloak * Fix example * Take out model comparison for now * Add meta text for compat * Remove chart.js dependency * Tidy up and simplify JS and port big components over to Vue * Remove chartjs example * Add Twitter icon * Add purple stylesheet option * Add utility for hand cursor (special cases only) * Add transition classes * Add small option for section * Add thumb object for small round thumbnail images * Allow unset code block language via "none" value (workaround to still allow unset language to default to DEFAULT_SYNTAX) * Pass through attributes * Add syntax highlighting definitions for Julia, R and Docker * Add website icon * Remove user survey from navigation * Don't hide GitHub icon on small screens * Make top navigation scrollable on small screens * Remove old resources page and references to it * Add Universe * Add helper functions for better page URL and title * Update site description * Increment versions * Update preview images * Update mentions of resources * Fix image * Fix social images * Fix problem with cover sizing and floats * Add divider and move badges into heading * Add docstrings * Reference converting section * Add section on converting word vectors * Move converting section to custom section and fix formatting * Remove old fastText example * Move extensions content to own section Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary) * Use better component example and add factories section * Add note on larger model * Use better example for non-vector * Remove similarity in context section Only works via small models with tensors so has always been kind of confusing * Add note on init-model command * Fix lightning tour examples and make excutable if possible * Add spacy train CLI section to train * Fix formatting and add video * Fix formatting * Fix textcat example description (resolves #2246) * Add dummy file to try resolve conflict * Delete dummy file * Tidy up [ci skip] * Ensure sufficient height of loading container * Add loading animation to universe * Update Thebelab build and use better startup message * Fix asset versioning * Fix typo [ci skip] * Add note on project idea label
2018-04-29 03:06:46 +03:00
.u-hidden,
[v-cloak]
display: none !important
2016-10-03 21:19:13 +03:00
2016-10-31 21:04:15 +03:00
@each $breakpoint in (xs, sm, md)
.u-hidden-#{$breakpoint}.u-hidden-#{$breakpoint}
2016-10-03 21:19:13 +03:00
@include breakpoint(max, $breakpoint)
display: none
💫 Interactive code examples, spaCy Universe and various docs improvements (#2274) * Integrate Python kernel via Binder * Add live model test for languages with examples * Update docs and code examples * Adjust margin (if not bootstrapped) * Add binder version to global config * Update terminal and executable code mixins * Pass attributes through infobox and section * Hide v-cloak * Fix example * Take out model comparison for now * Add meta text for compat * Remove chart.js dependency * Tidy up and simplify JS and port big components over to Vue * Remove chartjs example * Add Twitter icon * Add purple stylesheet option * Add utility for hand cursor (special cases only) * Add transition classes * Add small option for section * Add thumb object for small round thumbnail images * Allow unset code block language via "none" value (workaround to still allow unset language to default to DEFAULT_SYNTAX) * Pass through attributes * Add syntax highlighting definitions for Julia, R and Docker * Add website icon * Remove user survey from navigation * Don't hide GitHub icon on small screens * Make top navigation scrollable on small screens * Remove old resources page and references to it * Add Universe * Add helper functions for better page URL and title * Update site description * Increment versions * Update preview images * Update mentions of resources * Fix image * Fix social images * Fix problem with cover sizing and floats * Add divider and move badges into heading * Add docstrings * Reference converting section * Add section on converting word vectors * Move converting section to custom section and fix formatting * Remove old fastText example * Move extensions content to own section Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary) * Use better component example and add factories section * Add note on larger model * Use better example for non-vector * Remove similarity in context section Only works via small models with tensors so has always been kind of confusing * Add note on init-model command * Fix lightning tour examples and make excutable if possible * Add spacy train CLI section to train * Fix formatting and add video * Fix formatting * Fix textcat example description (resolves #2246) * Add dummy file to try resolve conflict * Delete dummy file * Tidy up [ci skip] * Ensure sufficient height of loading container * Add loading animation to universe * Update Thebelab build and use better startup message * Fix asset versioning * Fix typo [ci skip] * Add note on project idea label
2018-04-29 03:06:46 +03:00
//- Transitions
.u-fade-enter-active
transition: opacity 0.5s
.u-fade-enter
opacity: 0