1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-25 14:30:46 +02:00

Switch to Hugo

This commit includes all the needed workarounds and most changes from the main branch for everything to work, like:

* removing empty lines in raw HTML that break output
* read .browserslistrc, CSS variables from disk instead of duplicating it
* using Hugo mounts
* using Hugo for the docs CSS/JS
* move ToC Sass code to a separate file while adapting it for Hugo

Thus, this patch makes our npm scripts faster since lint runs on one step and there's no separate docs assets processing.
This commit is contained in:
XhmikosR
2020-11-04 16:39:29 +02:00
parent ae87f8f7ce
commit b46f05a948
325 changed files with 4463 additions and 3596 deletions

29
site/data/breakpoints.yml Normal file
View File

@@ -0,0 +1,29 @@
- breakpoint: xs
abbr: ""
name: Extra small
min-width: 0px
container: ""
- breakpoint: sm
abbr: -sm
name: Small
min-width: 576px
container: 540px
- breakpoint: md
abbr: -md
name: Medium
min-width: 768px
container: 720px
- breakpoint: lg
abbr: -lg
name: Large
min-width: 992px
container: 960px
- breakpoint: xl
abbr: -xl
name: Extra large
min-width: 1200px
container: 1140px

411
site/data/browser-bugs.yml Normal file
View File

@@ -0,0 +1,411 @@
-
browser: >
Edge
summary: >
Visual artifacts in scrollable modal dialogs
upstream_bug: >
Edge#9011176
origin: >
Bootstrap#20755
-
browser: >
Edge
summary: >
Native browser tooltip for `title` shows on first keyboard focus (in addition to custom tooltip component)
upstream_bug: >
Edge#6793560
origin: >
Bootstrap#18692
-
browser: >
Edge
summary: >
Hovered element still remains in `:hover` state after scrolling away.
upstream_bug: >
Edge#5381673
origin: >
Bootstrap#14211
-
browser: >
Edge
summary: >
CSS `border-radius` sometimes causes lines of bleed-through of the `background-color` of the parent element.
upstream_bug: >
Edge#3342037
origin: >
Bootstrap#16671
-
browser: >
Edge
summary: >
`background` of `<tr>` is only applied to first child cell instead of all cells in the row
upstream_bug: >
Edge#5865620
origin: >
Bootstrap#18504
-
browser: >
Edge
summary: >
Background color from lower layer bleeds through transparent border in some cases
upstream_bug: >
Edge#6274505
origin: >
Bootstrap#18228
-
browser: >
Edge
summary: >
Hovering over descendant SVG element fires `mouseleave` event at ancestor
upstream_bug: >
Edge#7787318
origin: >
Bootstrap#19670
-
browser: >
Edge
summary: >
Active `position: fixed;` `<button>` flickers when scrolling
upstream_bug: >
Edge#8770398
origin: >
Bootstrap#20507
-
browser: >
Firefox
summary: >
`.table-bordered` with an empty `<tbody>` is missing borders.
upstream_bug: >
Mozilla#1023761
origin: >
Bootstrap#13453
-
browser: >
Firefox
summary: >
If the disabled state of a form control is changed via JavaScript, the normal state doesn't return after refreshing the page.
upstream_bug: >
Mozilla#654072
origin: >
Bootstrap#793
-
browser: >
Firefox
summary: >
`focus` events should not be fired at the `document` object
upstream_bug: >
Mozilla#1228802
origin: >
Bootstrap#18365
-
browser: >
Firefox
summary: >
Wide floated table doesn't wrap onto new line
upstream_bug: >
Mozilla#1277782
origin: >
Bootstrap#19839
-
browser: >
Firefox
summary: >
Mouse sometimes not within element for purposes of `mouseenter`/`mouseleave` when it's within SVG elements
upstream_bug: >
Mozilla#577785
origin: >
Bootstrap#19670
-
browser: >
Firefox
summary: >
Layout with floated columns breaks when printing
upstream_bug: >
Mozilla#1315994
origin: >
Bootstrap#21092
-
browser: >
Firefox (Windows)
summary: >
Right border of `<select>` menu is sometimes missing when screen is set to uncommon resolution
upstream_bug: >
Mozilla#545685
origin: >
Bootstrap#15990
-
browser: >
Firefox (macOS & Linux)
summary: >
Badge widget causes bottom border of Tabs widget to unexpectedly not overlap
upstream_bug: >
Mozilla#1259972
origin: >
Bootstrap#19626
-
browser: >
Chrome (macOS)
summary: >
Clicking above `<input type="number">` increment button flashes the decrement button.
upstream_bug: >
Chromium#419108
origin: >
Bootstrap#8350, Chromium#337668
-
browser: >
Chrome
summary: >
CSS infinite linear animation with alpha transparency leaks memory.
upstream_bug: >
Chromium#429375
origin: >
Bootstrap#14409
-
browser: >
Chrome
summary: >
`table-cell` borders not overlapping despite `margin-right: -1px`
upstream_bug: >
Chromium#749848
origin: >
Bootstrap#17438, Bootstrap#14237
-
browser: >
Chrome
summary: >
Don't make `:hover` sticky on touch-friendly webpages
upstream_bug: >
Chromium#370155
origin: >
Bootstrap#12832
-
browser: >
Chrome
summary: >
`position: absolute` element that's wider than its column is incorrectly clipped to column boundary
upstream_bug: >
Chromium#269061
origin: >
Bootstrap#20161
-
browser: >
Chrome
summary: >
Significant performance hit for dynamic SVGs with text depending on the number of fonts in `font-family`.
upstream_bug: >
Chromium#781344
origin: >
Bootstrap#24673
-
browser: >
Safari
summary: >
`rem` units in media queries should be calculated using `font-size: initial`, not the root element's `font-size`
upstream_bug: >
WebKit#156684
origin: >
Bootstrap#17403
-
browser: >
Safari
summary: >
Link to container with id and tabindex results in container being ignored by VoiceOver (affects skip links)
upstream_bug: >
WebKit#163658
origin: >
Bootstrap#20732
-
browser: >
Safari
summary: >
CSS `min-width` and `max-width` media features should not round fractional pixel
upstream_bug: >
WebKit#178261
origin: >
Bootstrap#25166
-
browser: >
Safari (macOS)
summary: >
`px`, `em`, and `rem` should all behave the same in media queries when page zoom is applied
upstream_bug: >
WebKit#156687
origin: >
Bootstrap#17403
-
browser: >
Safari (macOS)
summary: >
Weird button behavior with some `<input type="number">` elements.
upstream_bug: >
WebKit#137269, Safari#18834768
origin: >
Bootstrap#8350,
Normalize#283,
Chromium#337668
-
browser: >
Safari (macOS)
summary: >
Small font size when printing webpage with fixed-width `.container`.
upstream_bug: >
WebKit#138192, Safari#19435018
origin: >
Bootstrap#14868
-
browser: >
Safari (iOS)
summary: >
`transform: translate3d(0,0,0);` rendering bug.
upstream_bug: >
WebKit#138162, Safari#18804973
origin: >
Bootstrap#14603
-
browser: >
Safari (iOS)
summary: >
Text input's cursor doesn't move while scrolling the page.
upstream_bug: >
WebKit#138201, Safari#18819624
origin: >
Bootstrap#14708
-
browser: >
Safari (iOS)
summary: >
Can't move cursor to start of text after entering long string of text into `<input type="text">`
upstream_bug: >
WebKit#148061, Safari#22299624
origin: >
Bootstrap#16988
-
browser: >
Safari (iOS)
summary: >
`display: block` causes text of temporal `<input>`s to become vertically misaligned
upstream_bug: >
WebKit#139848, Safari#19434878
origin: >
Bootstrap#11266, Bootstrap#13098
-
browser: >
Safari (iOS)
summary: >
Tapping on `<body>` doesn't fire `click` events
upstream_bug: >
WebKit#151933
origin: >
Bootstrap#16028
-
browser: >
Safari (iOS)
summary: >
`position:fixed` is incorrectly positioned when tab bar is visible on iPhone 6S+ Safari
upstream_bug: >
WebKit#153056
origin: >
Bootstrap#18859
-
browser: >
Safari (iOS)
summary: >
Tapping into an `<input>` within a `position:fixed` element scrolls to the top of the page
upstream_bug: >
WebKit#153224, Safari#24235301
origin: >
Bootstrap#17497
-
browser: >
Safari (iOS)
summary: >
`<body>` with `overflow:hidden` CSS is scrollable on iOS
upstream_bug: >
WebKit#153852
origin: >
Bootstrap#14839
-
browser: >
Safari (iOS)
summary: >
Scroll gesture in text field in `position:fixed` element sometimes scrolls `<body>` instead of scrollable ancestor
upstream_bug: >
WebKit#153856
origin: >
Bootstrap#14839
-
browser: >
Safari (iOS)
summary: >
Modal with `-webkit-overflow-scrolling: touch` doesn't become scrollable after added text makes it taller
upstream_bug: >
WebKit#158342
origin: >
Bootstrap#17695
-
browser: >
Safari (iOS)
summary: >
Don't make `:hover` sticky on touch-friendly webpages
upstream_bug: >
WebKit#158517
origin: >
Bootstrap#12832
-
browser: >
Safari (iOS)
summary: >
Element which is `position:fixed` disappears after opening a `<select>` menu
upstream_bug: >
WebKit#162362
origin: >
Bootstrap#20759
-
browser: >
Safari (iPad Pro)
summary: >
Rendering of descendants of `position: fixed` element gets clipped on iPad Pro in Landscape orientation
upstream_bug: >
WebKit#152637, Safari#24030853
origin: >
Bootstrap#18738

View File

@@ -0,0 +1,139 @@
-
browser: >
Edge
summary: >
Focusable elements should fire focus event / receive :focus styling when they receive Narrator/accessibility focus
upstream_bug: >
A11yUserVoice#16717318
origin: >
Bootstrap#20732
-
browser: >
Edge
summary: >
Implement the [`:dir()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir) from Selectors Level 4
upstream_bug: >
UserVoice#12299532
origin: >
Bootstrap#19984
-
browser: >
Edge
summary: >
Implement the HTML5 [`<dialog>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog)
upstream_bug: >
UserVoice#6508895
origin: >
Bootstrap#20175
-
browser: >
Edge
summary: >
Fire a [`transitioncancel` event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/transitioncancel_event) when a CSS transition is canceled
upstream_bug: >
UserVoice#15939898
origin: >
Bootstrap#20618
-
browser: >
Edge
summary: >
Implement the [`of <selector-list>` clause](https://caniuse.com/css-nth-child-of) of the `:nth-child()` pseudo-class
upstream_bug: >
UserVoice#15944476
origin: >
Bootstrap#20143
-
browser: >
Firefox
summary: >
Implement the [`of <selector-list>` clause](https://caniuse.com/css-nth-child-of) of the `:nth-child()` pseudo-class
upstream_bug: >
Mozilla#854148
origin: >
Bootstrap#20143
-
browser: >
Firefox
summary: >
Implement the HTML5 [`<dialog>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog)
upstream_bug: >
Mozilla#840640
origin: >
Bootstrap#20175
-
browser: >
Firefox
summary: >
When virtual focus is on a button or link, fire actual focus on the element, too
upstream_bug: >
Mozilla#1000082
origin: >
Bootstrap#20732
-
browser: >
Chrome
summary: >
Fire a [`transitioncancel` event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/transitioncancel_event) when a CSS transition is canceled
upstream_bug: >
Chromium#642487
origin: >
Chromium#437860
-
browser: >
Chrome
summary: >
Implement the [`of <selector-list>` clause](https://caniuse.com/css-nth-child-of) of the `:nth-child()` pseudo-class
upstream_bug: >
Chromium#304163
origin: >
Bootstrap#20143
-
browser: >
Chrome
summary: >
Implement the [`:dir()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir) from Selectors Level 4
upstream_bug: >
Chromium#576815
origin: >
Bootstrap#19984
-
browser: >
Safari
summary: >
Fire a [`transitioncancel` event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/transitioncancel_event) when a CSS transition is canceled
upstream_bug: >
WebKit#161535
origin: >
Bootstrap#20618
-
browser: >
Safari
summary: >
Implement the [`:dir()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir) from Selectors Level 4
upstream_bug: >
WebKit#64861
origin: >
Bootstrap#19984
-
browser: >
Safari
summary: >
Implement the HTML5 [`<dialog>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog)
upstream_bug: >
WebKit#84635
origin: >
Bootstrap#20175

26
site/data/colors.yml Normal file
View File

@@ -0,0 +1,26 @@
- name: blue
hex: "#0d6efd"
- name: indigo
hex: "#6610f2"
- name: purple
hex: "#6f42c1"
- name: pink
hex: "#d63384"
- name: red
hex: "#dc3545"
- name: orange
hex: "#fd7e14"
- name: yellow
hex: "#ffc107"
- name: green
hex: "#198754"
- name: teal
hex: "#20c997"
- name: cyan
hex: "#0dcaf0"
- name: white
hex: "#fff"
- name: gray
hex: "#6c757d"
- name: gray-dark
hex: "#343a40"

32
site/data/core-team.yml Normal file
View File

@@ -0,0 +1,32 @@
- name: Mark Otto
user: mdo
- name: Jacob Thornton
user: fat
- name: Chris Rebert
user: cvrebert
- name: XhmikosR
user: xhmikosr
- name: Patrick H. Lauke
user: patrickhlauke
- name: Gleb Mazovetskiy
user: glebm
- name: Johann-S
user: johann-s
- name: Andres Galante
user: andresgalante
- name: Martijn Cuppens
user: martijncuppens
- name: Shohei Yoshida
user: ysds
- name: Gaël Poupard
user: ffoodd

View File

@@ -0,0 +1,46 @@
- group: v1.x
baseurl: "https://getbootstrap.com"
description: "Every minor and patch release from v1 is listed below."
versions:
- v: "1.0.0"
- v: "1.1.0"
- v: "1.1.1"
- v: "1.2.0"
- v: "1.3.0"
- v: "1.4.0"
- group: v2.x
baseurl: "https://getbootstrap.com"
description: "Every minor and patch release from v2 is listed below."
versions:
- v: "2.0.0"
- v: "2.0.1"
- v: "2.0.2"
- v: "2.0.3"
- v: "2.0.4"
- v: "2.1.0"
- v: "2.1.1"
- v: "2.2.0"
- v: "2.2.1"
- v: "2.2.2"
- v: "2.3.0"
- v: "2.3.1"
- v: "2.3.2"
- group: v3.x
baseurl: "https://getbootstrap.com/docs"
description: "Every minor and patch release from v3 is listed below. Last update was v3.4.1."
versions:
- v: "3.3"
- v: "3.4"
- group: v4.x
baseurl: "https://getbootstrap.com/docs"
description: "Current major release and its minor versions. Last update was v4.5.3."
versions:
- v: "4.0"
- v: "4.1"
- v: "4.2"
- v: "4.3"
- v: "4.4"
- v: "4.5"

55
site/data/examples.yml Normal file
View File

@@ -0,0 +1,55 @@
- category: Custom Components
description: "Brand new components and templates to help folks quickly get started with Bootstrap and demonstrate best practices for adding onto the framework."
examples:
- name: Album
description: "Simple one-page template for photo galleries, portfolios, and more."
- name: Pricing
description: "Example pricing page built with Cards and featuring a custom header and footer."
- name: Checkout
description: "Custom checkout form showing our form components and their validation features."
- name: Product
description: "Lean product-focused marketing page with extensive grid and image work."
- name: Cover
description: "A one-page template for building simple and beautiful home pages."
- name: Carousel
description: "Customize the navbar and carousel, then add some new components."
- name: Blog
description: "Magazine like blog template with header, navigation, featured content."
- name: Dashboard
description: "Basic admin dashboard shell with fixed sidebar and navbar."
- name: Sign-in
description: "Custom form layout and design for a simple sign in form."
- name: Sticky footer
description: "Attach a footer to the bottom of the viewport when page content is short."
- name: Sticky footer navbar
description: "Attach a footer to the bottom of the viewport with a fixed top navbar."
- category: Framework
description: "Examples that focus on implementing uses of built-in components provided by Bootstrap."
examples:
- name: "Starter template"
description: "Nothing but the basics: compiled CSS and JavaScript."
- name: Grid
description: "Multiple examples of grid layouts with all four tiers, nesting, and more."
- name: Jumbotron
description: "Build around the jumbotron with a navbar and some basic grid columns."
- category: Navbars
description: "Taking the default navbar component and showing how it can be moved, placed, and extended."
examples:
- name: Navbars
description: "Demonstration of all responsive and container options for the navbar."
- name: Navbar static
description: "Single navbar example of a static top navbar along with some additional content."
- name: Navbar fixed
description: "Single navbar example with a fixed top navbar along with some additional content."
- name: Navbar bottom
description: "Single navbar example with a bottom navbar along with some additional content."
- category: Experiments
description: "Examples that focus on future-friendly features or techniques."
examples:
- name: Floating labels
description: "Beautifully simple forms with floating labels over your inputs."
- name: Offcanvas
description: "Turn your expandable navbar into a sliding offcanvas menu."

18
site/data/grays.yml Normal file
View File

@@ -0,0 +1,18 @@
- name: 100
hex: "#f8f9fa"
- name: 200
hex: "#e9ecef"
- name: 300
hex: "#dee2e6"
- name: 400
hex: "#ced4da"
- name: 500
hex: "#adb5bd"
- name: 600
hex: "#868e96"
- name: 700
hex: "#495057"
- name: 800
hex: "#343a40"
- name: 900
hex: "#212529"

92
site/data/sidebar.yml Normal file
View File

@@ -0,0 +1,92 @@
- title: Getting started
pages:
- title: Introduction
- title: Download
- title: Contents
- title: Browsers & devices
- title: JavaScript
- title: Theming
- title: Build tools
# - title: Best practices # TODO: Write this content
- title: Webpack
- title: Accessibility
- title: Layout
pages:
- title: Overview
- title: Grid
- title: Utilities for layout
- title: Content
pages:
- title: Reboot
- title: Typography
- title: Code
- title: Images
- title: Tables
- title: Figures
- title: Components
pages:
- title: Alerts
- title: Badge
- title: Breadcrumb
- title: Buttons
- title: Button group
- title: Card
- title: Carousel
- title: Collapse
- title: Dropdowns
- title: Forms
- title: Input group
- title: Jumbotron
- title: List group
- title: Media object
- title: Modal
- title: Navs
- title: Navbar
- title: Pagination
- title: Popovers
- title: Progress
- title: Scrollspy
- title: Spinners
- title: Toasts
- title: Tooltips
- title: Utilities
pages:
- title: Borders
- title: Clearfix
- title: Close icon
- title: Colors
- title: Display
- title: Embed
- title: Flex
- title: Float
- title: Image replacement
- title: Interactions
- title: Overflow
- title: Position
- title: Screen readers
- title: Shadows
- title: Sizing
- title: Spacing
- title: Stretched link
- title: Text
- title: Vertical align
- title: Visibility
- title: Extend
pages:
- title: Approach
- title: Icons
- title: Migration
- title: About
pages:
- title: Overview
- title: Team
- title: Brand
- title: License
- title: Translations

View File

@@ -0,0 +1,16 @@
- name: primary
hex: "#007bff"
- name: secondary
hex: "#868e96"
- name: success
hex: "#28a745"
- name: danger
hex: "#dc3545"
- name: warning
hex: "#ffc107"
- name: info
hex: "#17a2b8"
- name: light
hex: "#f8f9fa"
- name: dark
hex: "#343a40"

View File

@@ -0,0 +1,29 @@
- name: 中文(繁體)
code: zh-tw
description: Bootstrap 4 繁體中文手冊
url: https://bootstrap.hexschool.com/
- name: Chinese
code: zh
description: Bootstrap 4 · 全球最流行的 HTML、CSS 和 JS 工具库。
url: https://code.z01.com/v4/
- name: Chinese Simplified
code: zh-CN
description: Bootstrap · 全球最受欢迎的 HTML、CSS 和 JS 库。
url: https://bootstrap-zh-cn.github.io/
- name: Brazilian Portuguese
code: pt-BR
description: Bootstrap 4 Português do Brasil
url: https://getbootstrap.com.br/v4/
- name: Japanese
code: ja
description: Bootstrap 4 日本語リファレンス
url: https://getbootstrap.jp/
- name: Korean
code: ko
description: Bootstrap 4 한국어 문서
url: https://getbootstrap.kr/