Skip to content

Add basic position to dropup/right/left - #25324

Closed
ysds wants to merge 2 commits into
twbs:v4-devfrom
ysds:dropdown-basic-position
Closed

ysds wants to merge 2 commits into
twbs:v4-devfrom
ysds:dropdown-basic-position

Conversation

@ysds

@ysds ysds commented Jan 16, 2018 •

Copy link
Copy Markdown
Contributor

Fixes: #25304

This changes fix a position of dropright/left menu on navbar. And give a basic position for dropup/right/left for disable popper support in the future enhancement (#24092).

Note:

  • The direction of carets on navbar is not responsive. (e.g. a caret of dropright is turning to the right even on mobile.)
  • display is not defined for dropright. In many cases it should be use in/on an inline element (.btn-group or .d-inline-block etc). Otherwise the dropright menu will jump to the right end (left: 100%) of the div.

@mdo mdo added css Sass sources or compiled CSS v4 v4, the frozen docs on gh-pages labels Jan 16, 2018
@Johann-S

Copy link
Copy Markdown
Member

is it possible to see a live example in a CodePen ?

@ysds

ysds commented Jan 16, 2018

Copy link
Copy Markdown
Contributor Author

While creating a demo, I noticed a bug in this PR. The dropleft/dropup menu is broken by right, bottom property when not disabled popper (actually by default).

Demo: https://codepen.io/anon/pen/MrqGBV

@ysds

ysds commented Jan 16, 2018

Copy link
Copy Markdown
Contributor Author

Closing since has a bug

@ysds ysds closed this Jan 16, 2018
@Johann-S

Copy link
Copy Markdown
Member

@Johann-S

Copy link
Copy Markdown
Member

I think it's doable to fix that issue @ysds , bottom: 100% should be applied only for Dropdown and not for Dropup

@ysds

ysds commented Jan 16, 2018

Copy link
Copy Markdown
Contributor Author

Dropup works pretty well currently (with Popper.js disabled) :

Yes. because it has the spesific scss:

bootstrap/scss/_navbar.scss

Lines 193 to 197 in 1f490ec

.dropup {
.dropdown-menu {
top: auto;
bottom: 100%;
}

but dropup will not work the outside of navbar after the future enhancement (#24092).

@ysds
ysds deleted the dropdown-basic-position branch April 10, 2018 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css Sass sources or compiled CSS v4 v4, the frozen docs on gh-pages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants