Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

input and select are not equal width #6035

Merged
merged 4 commits into from
Dec 6, 2016
Merged

input and select are not equal width #6035

merged 4 commits into from
Dec 6, 2016

Conversation

jkup
Copy link
Contributor

@jkup jkup commented Dec 6, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

TIL that select boxes aren't box-sizing: border-box like input elements are which is causing them to be wider than they should be if they have padding. The easy fix is just manually setting all inputs and selects to border-box (this is what Bootstrap does, although they apply it to the entire html selector!)

Fix #5192

Auditors @bradleyrichter @bsclifton

Test Plan:

  1. Open Brave
  2. Add a bookmark on Bookmark toolbar
  3. Make sure the Title and Folder are the same width
  4. Open about:bookmarks
  5. Cick the star icon on the page
  6. Make sure three rows are the same width

@jkup jkup added design A design change, especially one which needs input from the design team. QA/test-plan-specified labels Dec 6, 2016
@jkup jkup added this to the 0.13.0 milestone Dec 6, 2016
stefankolb and others added 3 commits December 6, 2016 14:38
Fix #5192

Both input elements on the New Bookmark Folder form have the following
CSS properties set:

 * width: 100%;
 * max-width: 250px;
 * padding: 0 5px;

The default value for box-sizing is content-box (see
https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing). This
causes the input field for the bookmark folder's title to be 100% +
5px + 5px (width + padding left + padding right) wide. However, the
padding is not applied to the select field for parent folder selection,
causing the field to be only 100% wide (without the padding).

Using border-box as value for the box-sizing attribute for both form
fields renders them at an equal width.
@luixxiul
Copy link
Contributor

luixxiul commented Dec 6, 2016

Cherry-picked and pushed the commits of #5837 to fix the dialog on about:bookmarks

screenshot 2016-12-06 14 24 31

into

screenshot 2016-12-06 14 27 46

@bradleyrichter
Copy link
Contributor

bradleyrichter commented Dec 6, 2016 via email

@luixxiul
Copy link
Contributor

luixxiul commented Dec 6, 2016

@bsclifton would you please apply modalOverlay to the modal dialog on about:bookmarks? It will make it possible for us to use modalOverlay.js and modalOverlay.less, which would help to make the style more consistent, including margins and paddings :-) (I thought you have implemented the dialog. Sorry if I'm wrong!)

@bradleyrichter I have replaced the close button for the modal dialog with the SVG button in 21ece29#diff-a12551e83f49ce14bb3d831f382ff9acR106 of #6009.

@luixxiul
Copy link
Contributor

luixxiul commented Dec 6, 2016

@bsclifton @bradleyrichter I opened an issue for that: #6040

@bbondy
Copy link
Member

bbondy commented Dec 6, 2016

++

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design A design change, especially one which needs input from the design team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

width of input and select elements on new bookmark folder form is not equal
5 participants