0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Commit Graph

107 Commits

Author SHA1 Message Date
Gaël Poupard
7e47b7ecc9
Reset Popper position in RTL (#32415)
The RTL cheatsheet's dropdowns aren't positioned correctly because of RTLCSS transforming `right: auto` to `left:auto` (which conflicts with Popper positioning).
2020-12-10 16:38:42 +02:00
Gaël Poupard
9312442338 fix(dropdown): ensure [style] will override inline styles 2020-12-06 18:42:40 +02:00
Martijn Cuppens
d8f247392d Fix conflict with Bootstrap CSS 2020-12-06 18:42:40 +02:00
Johann-S
adfdf7160b Update to popper.js v2.x 2020-12-06 18:42:40 +02:00
Gaël Poupard
9488978fb5 feat(RTL): implement RTL
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-04 07:52:03 +02:00
XhmikosR
f4457bca02
Be consistent with Popper's name. (#32224)
The npm package is named "popper.js" but the project is named "Popper", so use the latter consistently.
2020-11-21 16:22:08 +02:00
Mark Otto
585b3ec532
Add .dropdown-menu-dark (#30171)
* Add .dropdown-menu-dark

* Match background color to navbar dark

* Update docs to include a navbar example

* Update dropdowns.md

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-09-24 18:55:15 +03:00
Mark Otto
fe77208a01 Add new variable for -padding-x 2020-09-22 10:06:08 -07:00
Martijn Cuppens
83b49aa688
Create scss-docs shortcode to get some snippets from the Scs… (#30502)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-04-06 20:13:35 +02:00
Martijn Cuppens
7fc4037a02 Remove redundant text decoration from hover states 2020-03-20 09:35:55 +01:00
Martijn Cuppens
d9215ebd5a
$link-decoration: underline affects some components (#30262)
Co-authored-by: Shohei Yoshida <fellows3@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-03-05 15:22:52 +01:00
Giovanni Mendoza
daf0c438f1
Added new variable for padding on dropdown header (#29946)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-02-15 12:06:02 +01:00
Martijn Cuppens
f54b83073d Shorten if notations so that property order can be applied 2020-02-12 19:45:54 +02:00
Martijn Cuppens
0aabaa209d Drop nav divider mixin 2019-08-22 08:10:44 +02:00
Martijn Cuppens
b2ae6a6a94 Apply at-mixin-argumentless-call-parentheses: always stylelint rule 2019-07-24 10:31:49 +03:00
Mark Otto
1d4d9f8d89 Drop all hover mixins
Previously deprecated in v4.x, this clears out the now unused Sass option and removes some unused mixins. Arguably we could remove more, but I like the hover-focus mixin and we make extensive use of it across the project.
2019-05-08 20:58:07 +03:00
Martijn Cuppens
0321fbf036
Remove floats from dropdown (#28690) 2019-05-02 20:37:10 +02:00
Martijn Cuppens
51375abca5
Responsive font size implementation (#23816) 2019-02-07 23:32:05 +01:00
Martijn Cuppens
d4e782efab Fix dropdown radius if $dropdown-padding-y is not 0 (#28127) 2019-02-03 23:07:16 +02:00
Martijn Cuppens
59d040fcbb Make component colors configurable (#28035) 2019-01-20 23:38:29 +02:00
Martijn Cuppens
e57cdee6bc Sync dropdown font size with btn font size 2019-01-13 16:27:40 -08:00
Martijn Cuppens
e077ddbc6c Prevent wrapping if caret is included (#28029) 2019-01-13 09:43:52 +02:00
Shohei Yoshida
92cc5a70d3 Fix incorrect responsive alignment of dropdown menu (#27873) 2019-01-07 03:12:51 +02:00
Mark Otto
15be9d3277
Add variable for dropdown-divider-margin-y (#27857)
* Add variable for dropdown-divider-margin-y

For us to reassign the nav-divider-margin-y variable here, we have to rearrange some of the variables.

Fixes #26660.

* bump bundlesize
2018-12-21 20:59:40 -08:00
Roy Klutman
e7e43edf65 Add border-radius to dropdown items (#27703) 2018-11-22 00:24:13 +02:00
Martijn Cuppens
d0b7eb1111 Cleanup stylelint comments 2018-10-23 00:21:33 +03:00
ysds
becb6ce346 Add dropdown responsive alignment (#26255) 2018-10-21 11:01:22 +03:00
Howard Cox
44b3f77852 Prevent pointer-events on disabled anchor dropdown-item
Fixes #26695
2018-09-26 07:20:46 +03:00
ysds
14f712601e Add basic position to dropup/right/left and dropdown-menu-right (#25400) 2018-03-12 19:44:05 +02:00
Mark Otto
d402183014
v4.1: Add .dropdown-item-text (#22965)
* Add .dropdown-item-text class

* Add example of plain text within a .dropdown-menu, too

* reorganize, simple/clearer headings
2018-01-21 22:40:55 -08:00
XhmikosR
34d745540d
Minor Sass consistency changes. (#24677)
* use `background-color` instead of the shorthand
* use `outline: 0` consistently
* fix transform order
* remove quotes from `SFMono-Regular`
2017-11-06 02:23:36 +02:00
Johann-S
e454c8ec1e Add dropright and dropleft (right and left placements for our dropdown) (#23860)
* Add dropright (right placement for our dropdown)

* Add dropleft

* moves drop left arrow to the left
2017-10-29 15:29:13 -07:00
José Francisco
502d6b2579 Add variable to configure the $dropdown-border-radius. (#24376) 2017-10-22 13:47:31 -07:00
Mark Otto
06641ca0b3 Gradients and shadows (#24429)
* Update the form focus mixin to use a manual `$enable-shadows` check so we can always ensure a focus state for accessibility and consistency

* - Add new `$input-btn-focus-width` and `$input-btn-focus-color` variables.

- Replace separate `$btn-focus-box-shadow` and `$input-focus-box-shadow`
variables with unified `$input-btn-focus-box-shadow` to match our
combined variables approach elsewhere.

* Put new focus width var to use in buttons mixins

* use new button input-box shadow var

* Add a new mixin for quickly adding linear gradient to components when $enable-gradients is set to true

* use correct var

* fix focus shadows in button mixins

* Add opt-in gradients to alerts, buttons, carousel, custom radios and checkboxes, custom file input, and dropdown items

* Generate .bg-gradient- utilities

* add headings to colors page and document bg-gradient utils

* update the button color for active status, check with yiq as it's done for basic state and hover state
2017-10-19 09:03:33 -07:00
XhmikosR
f7acb278e2 Refactor a few selectors so that the least specific ones are first. (#24310) 2017-10-10 16:46:43 +03:00
Mark Otto
e626277c73 Merge branch 'dropdown-caret' of https://github.com/pat270/bootstrap into v4-dev 2017-10-02 20:51:14 -07:00
Ari Rizzitano
136c49a13f Remove dropdown anchor focus override
Overriding the focus outline for links within the dropdown menu
causes accessibility issues for keyboard-only users. This
removes the override, reenabling the browser's default focus
outline.
2017-09-30 14:19:00 -07:00
Patrick Yeo
e6042e6f44 Add option to disable carets on dropdowns through $enable-caret 2017-08-14 09:10:17 -07:00
Patrick Yeo
cd3507aba6 Dropup dropdown-menu should have margin on the bottom instead of top 2017-08-04 15:17:50 -07:00
Patrick Yeo
0501b029f5 (#22414) Rename for consistency $dropdown-margin-top to $dropdown-spacer 2017-08-04 15:17:50 -07:00
Mark Otto
960e73c16f tweak dropdown caret size and placement 2017-05-30 13:59:24 -07:00
Johann-S
b36d8ae6cb Use popper to align dropdown menu instead of using css with important 2017-05-17 22:03:11 +02:00
Johann-S
dc35a840dc Fix dropdown-menu-right and dropdown-menu-left for Dropdown 2017-05-14 11:41:19 +02:00
Johann-S
53ee455bc7 Handle dropup for Dropdown 2017-05-14 11:41:19 +02:00
Johann-S
69de65180f Fix unit tests + Update Popper to 1.6.0 2017-05-14 11:41:19 +02:00
Johann-S
54a8ab4011 Begin to use Popper for Dropdown 2017-05-14 11:41:19 +02:00
Patrick H. Lauke
6d64afe508 Replace dropdown backdrop hack with cleaner JS-only hack
* Replace backdrop with simple noop mouse listener

As discussed in https://github.com/twbs/bootstrap/pull/22422 the current
approach of injecting a backdrop (to work around iOS' broken event
delegation for the `click` event) has annoying consequences on
touch-enabled laptop/desktop devices.
Instead of a backdrop `<div>`, here we simply add extra empty/noop
mouse listeners to the immediate children of `<body>` (and remove
them when the dropdown is closed) in order to force iOS to properly
bubble a `click` resulting from a tap (essentially, method 2 from
https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html)
This is sufficient (except in rare cases where the user does manage to tap
on the body itself, rather than any child elements of body - which is not
very likely in an iOS phone/tablet scenario for most layouts) to get iOS to
get a grip and do the correct event bubbling/delegation, meaning the regular
"click" event will bubble back to the `<body>` when tapping outside of the dropdown,
and the dropdown will close properly (just like it already does, even without
this fix, in non-iOS touchscreen devices/browsers, like Chrome/Android and
Windows on a touch laptop).
This approach, though a bit hacky, has no impact on the DOM structure, and
has no unforeseen side effects on touch-enabled laptops/desktops. And crucially,
it works just fine in iOS.

* Remove dropdown backdrop styles

* Update doc for dropdowns and touch-enabled devices
2017-04-14 09:19:00 +01:00
Patrick H. Lauke
7056f70240 Remove cursor: not-allowed styles 2017-04-10 22:10:20 +01:00
Mark Otto
050aab338b Add dropdown-item-padding-y var
- Closes #21622 which kept the 3px
- Puts variable in proper order for shorthand (y x)
2017-04-08 14:40:11 -07:00
Jesper Strange Klitgaard Christiansen
11c2c07e26 Remove margin-left on caret if empty (#22095) 2017-04-08 14:23:07 -07:00