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

The width of an element does not include its border #2

Open
Faterou opened this issue Jun 19, 2015 · 4 comments
Open

The width of an element does not include its border #2

Faterou opened this issue Jun 19, 2015 · 4 comments

Comments

@Faterou
Copy link
Contributor

Faterou commented Jun 19, 2015

Originally reported by: Gabrielle Bastien (Bitbucket: gabrielle_bastien, GitHub: Unknown)


If an element is set to a certain width and has a border, the width read by Cornipickle is less than the given width, because of the border.
It could be better to set the default width as the total width (width + border), which represents the total space taken by the element on the page.

Suggestion:

width for the total width (i.e. the total space occupied)

  • inner width for the width without the border

@Faterou
Copy link
Contributor Author

Faterou commented Jul 19, 2015

Original comment by Sylvain Hallé (Bitbucket: sylvainhalle, GitHub: sylvainhalle):


Removing component: JavaScript Probe (automated comment)

@Faterou
Copy link
Contributor Author

Faterou commented Apr 26, 2016

Original comment by Francis Guérin (Bitbucket: Faterou, GitHub: Faterou):


Can an object's border influence the properties of other elements on the page? If it's just cosmetic, I'm not sure if always doing width + border is a good idea.

@Faterou
Copy link
Contributor Author

Faterou commented Apr 26, 2016

Original comment by Sylvain Hallé (Bitbucket: sylvainhalle, GitHub: sylvainhalle):


Why not just have two different properties with two names:

  • width for the total width (i.e. the total space occupied)
  • inner width for the width without the border

@Faterou
Copy link
Contributor Author

Faterou commented Apr 26, 2016

Original comment by Francis Guérin (Bitbucket: Faterou, GitHub: Faterou):


I agree with that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant