
Problem/Motivation
Claro uses the default box-model "content-box", what causes unnecessary calculations for width and height (+ min-* & max-*) attributes.
Proposed resolution
Use "border-box" as described here: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-be...
I think border-box still is the de facto standard / best-practise since years, so i don't know why content-box is used in Claro?
Comment | File | Size | Author |
---|
Issue fork drupal-3192130
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedHi thomas.frobieter,
I don't see content-box defined anywhere in claro theme.
Would you please help me out for this.
Regards Pooja.
Comment #3
thomas.frobieterHi @pooja-ganjage,
you're right, 'content-box' is the browsers default value, Claro MAY need to add 'border-box' as its default.
Maybe I'm wrong, but I think it's worth to discuss. Inside my "webdesign-bubble" it's a default thing, I don't see any benefit using content-box, because you often need to subtract the padding (& border-width) from the width & height.
Comment #4
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedHi @thomas.frobieter,
I was go through the Claro theme and it has already defined whenever it's needed 'border-box'.
Comment #5
idebr CreditAttribution: idebr at iO commentedComment #10
gauravvvv CreditAttribution: gauravvvv at Axelerant for Drupal India Association commentedI have attached the patch, please review
Comment #11
smustgrave CreditAttribution: smustgrave at Mobomo commentedChanges seems simple enough.
Comment #13
swatidhurandhar CreditAttribution: swatidhurandhar at Material for Drupal India Association commentedI have created a new patch since #10 was failing through some test cases.
Comment #14
viren18febs CreditAttribution: viren18febs at Concinnity Media Technologies for Concinnity Media Technologies commentedComment #15
smustgrave CreditAttribution: smustgrave at Mobomo commented11.x is the current development branch and #10 still applies
Comment #17
gauravvvv CreditAttribution: gauravvvv at Axelerant for Drupal India Association commentedRandom failure, restoring status
Comment #18
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
Comment #21
nod_restoring status, credited for target version update
Comment #22
nod_I do not understand what this changes practically.
The IS mentions that it causes unnecessary calculations but there is no simplifications in the code at all. I'm tempted to close this issue as "works as designed" if we don't have any other change in this MR.
Comment #23
nod_Comment #24
smustgrave CreditAttribution: smustgrave at Mobomo commentedPer #22 since there hasn't been any follow up.