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

65 Commits

Author SHA1 Message Date
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
Mark Otto
08984ac8cd Remove the outline override from dropdown toggles
fixes #17573
2017-03-12 18:26:53 -07:00
Mark Otto
0ffd369afd clarify usage of base font-size so we know what's up 2017-01-03 19:32:57 -08:00
Quy
2ea7e388e7 Drop .carete (#21525) 2017-01-03 19:31:27 -08:00
Mark Otto
2bf0bde470 remove magic dropdown positioning for fixed bottom; folks should set this as needed with .dropup modifier 2017-01-02 11:52:25 -08:00
Mark Otto
9ce5fb5817 Revamp dropdown item states
- Removes the plain-hover-focus mixin from active and disabled states; no need for them.
- Adds :active and :disabled since we can use button elements here, too.
- Wrap the disabled background-image override in an -gradients condition.
2016-12-28 15:13:43 -08:00
Bardi Harborow
855a67b1d6 Remove IE9 browser hacks. (#21393) 2016-12-22 13:41:31 -08:00
Starsam80
bf39bb3ac3
Rename .active to .show 2016-12-07 21:20:15 -07:00
Mark Otto
aa11f00218 Merge pull request #20982 from Johann-S/fix19344
Fix #19344 - Use a single class name for opened/expanded/shown state of widgets
2016-10-25 19:57:51 -07:00
Johann-S
9d129a43d6 Use a single class name for opened/expanded/shown state of widgets 2016-10-25 14:07:41 +02:00
Simon Bächler
8402d2321f Use a variable for the default font weights. Fixes #20741
Websites might use different weights such as medium or thin or use light as default weight instead of normal.
Also referenced: #18605 and #16170.
2016-10-19 21:41:27 +02:00
Mark Otto
a75330ca96 v4: Dropdown units (#20701)
* Fixes #19784: Move from pixels to rems, add a margin-bottom: 0; to keep things aligned

* lintiong
2016-10-02 18:25:51 -07:00
Mark Otto
b280e36b78 Merge branch 'v4-dev' into v4-split-buttons 2016-05-11 11:07:06 -07:00
Chris Rebert
1f5621f46e Extract $dropdown-padding-y variable
[skip sauce]
[skip validator]
2016-02-17 21:07:12 -08:00
Mark Otto
13c8ecd893 Merge pull request #19239 from twbs/dropdown-margin-top
Extract $dropdown-margin-top variable
2016-02-17 08:54:47 -08:00
Chris Rebert
1046e27dd3 Extract $dropdown-item-padding-x variable
[skip sauce]
[skip validator]
2016-02-16 21:16:55 -08:00
Chris Rebert
dcb29fc814 Extract $dropdown-margin-top variable
[skip sauce]
[skip validator]
2016-02-16 21:13:15 -08:00
Chris Rebert
4c6946b3a9 Extract $dropdown-min-width variable
[skip sauce]
[skip validator]
2016-02-16 00:42:10 -08:00
Mark Otto
612d287a07 Fixes #18550: really remove that reference 2016-02-06 20:46:11 -08:00
Mark Otto
d7d0e186bd Merge branch 'v4-dev' into v4-split-buttons 2016-02-06 20:33:26 -08:00
Mark Otto
64b88bd707 remove comment 2016-02-06 20:28:36 -08:00
Mark Otto
ba37c37615 Redo line-height globally
- Rename -height to -height-base to match other vars
- Drop use of -height across the board and rely on it to be inherited
- Adjust padding of .dropdown-header to account for different line-height of h6 heading element (this needs refactoring for variables and rems also)
2016-02-03 19:45:13 -08:00
Mark Otto
3a2f0456bf Merge pull request #18883 from twbs/zindex-dropdown-backdrop
Use proper variable for .dropdown-backdrop's z-index
2016-01-17 15:25:58 -08:00
Chris Rebert
58f7e602ae Extract $dropdown-box-shadow variable 2016-01-16 20:23:37 -08:00
Chris Rebert
27a7fff0fb Use proper variable for .dropdown-backdrop's z-index 2016-01-13 16:21:52 -08:00
Mark Otto
f6ad665c26 Switch up some split button stuff
- New vars
- New function for stripping units so we can combine rems and ems in math functions
- Add new classes for sizing and spacing around the split dropdown toggle so that the caret isn't misaligned
2016-01-08 13:23:24 -08:00
Mark Otto
c68019e5d0 Merge pull request #18257 from twbs/border-width-vars
Add more border width variables
2015-11-29 19:52:22 -08:00
Chris Rebert
a23cf74340 _dropdown.scss: Revise comments; fixes #18363
[skip sauce]
2015-11-27 20:12:37 -08:00
Chris Rebert
2ea8950b26 Add $dropdown-border-width; refs #18150 2015-11-14 22:40:43 -08:00
Chris Rebert
76f7056321 $dropdown-border => $dropdown-border-color 2015-11-14 22:28:45 -08:00
Chris Rebert
6d591edcb7 .dropdown-menu: Swap color and font-size property order to make SCSS Lint happy 2015-11-13 00:21:43 -08:00
Chris Rebert
98ec749117 Swap margin-right and margin-left ordering in .dropdown-toggle::after to make SCSS Lint happy
[ci skip]
2015-11-13 00:19:19 -08:00
Mark Otto
f25d709025 Merge pull request #18061 from mathisonian/patch-1
remove bro from comment
2015-11-12 23:37:02 -08:00
Mark Otto
c1af4aa227 Merge pull request #17277 from kkirsche/patch-5
v4 — Use the body color for dropdown menu text in navbars
2015-11-12 22:17:02 -08:00
Mark Otto
8d46755f99 Merge pull request #17137 from kkirsche/patch-10
v4: Dropdown caret is not horizontally alligned
2015-11-12 21:32:22 -08:00
Matthew Conlen
94043ac71c remove bro from comment 2015-10-26 13:40:08 -04:00
Kevin Kirsche
57943ed8ee Use the body color for dropdown menu text
Fix #17276
2015-09-01 21:23:43 -07:00
Felipe
67995d034e PropertySortOrder
Properties should be ordered border-top, border-bottom
2015-08-24 16:44:55 -05:00
Kevin Kirsche
d51f0a4f81 Use double colons for psuedo elements
Fix #17052
2015-08-24 13:22:10 -04:00
Mark Otto
19deadda95 shorter 2015-08-23 23:00:47 -07:00
Mark Otto
02069152a2 Merge pull request #17147 from kkirsche/patch-14
v4 - Dropup caret direction incorrect
2015-08-23 22:59:43 -07:00
Kevin Kirsche
e707a45b1f v4 - Dropup caret direction incorrect
Fix #17144
2015-08-23 08:12:56 -04:00
Mark Otto
a5bfbe0fca fix remaining scss lint errors 2015-08-23 01:12:00 -07:00