vigetlabs / colonel-kurtz

A Block Editor
MIT License
319 stars 33 forks source link

Firefox .col-menu-item collapsing #117

Open mzlock opened 8 years ago

mzlock commented 8 years ago

Current styles:

.col-menu {
  min-width: 144px;
}
.col-menu-item {
  width: 100%;
}

Firefox is taking these styles literally, so the .col-menu is always the minimum width and doesn't stretch to fit larger children. The larger children then get cut off.

This seems to fix it cross-browser:

.col-menu-item {
  min-width: 100%;
  (remove) width: 100%;
}

screen shot 2015-12-21 at 6 23 10 pm

nhunzaker commented 8 years ago

This is a fantastic issue. I'll integrate this now.

nhunzaker commented 8 years ago

Brings up another question. What do you think about wrapping the text like:

screen shot 2016-01-12 at 10 22 52 am

What do you think?

nhunzaker commented 8 years ago

For comparison:

screen shot 2016-01-12 at 10 27 56 am

screen shot 2016-01-12 at 10 28 15 am

nhunzaker commented 8 years ago

Technically, we reference Material Design for the CK UI, this is what they have to say about menus:

https://www.google.com/design/spec/components/menus.html

efatsi commented 8 years ago

1 vote for leaving things in one line

nhunzaker commented 8 years ago

@efatsi this is the only edge case we need to figure out how to cover:

screen shot 2016-01-12 at 10 35 20 am

A small screen size was necessary for the example, but I could see this being an issue on larger screens too. For example:

screen shot 2016-01-12 at 10 37 05 am

nhunzaker commented 8 years ago

We could make the menu open from the outside in (as opposed to always hanging from the right to left) to account for that specific issue.

nhunzaker commented 8 years ago

Okay. Here's where I'm at:

menu

efatsi commented 8 years ago

:+1: :+1: :+1: :+1: :+1:

nhunzaker commented 8 years ago

@efatsi I'll send out a patch release to fix the firefox bug, then I'll submit a PR with the menu change.