vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

Correct calculation of input padding to take real border width in con…

Open lyubomir-popov opened this issue 1 year ago • 2 comments

…sideration

Done

Inpuit padding has a correctionm for border, but it uses a hard-coded 1px value. We set borders using a variable, which happens to be 1.5px. This PR corrects that error by referencing the variable instead of the hard-coded 1px value.

QA

  • Open demo
  • check buttons and inputs, verify the padding has 1.5px subtracted from the nudge value. This is a sub-pixel difference, but hsould help things adhere better to the baseline grid.
  • [Add QA steps]
  • Review updated documentation:
    • [List any updated documentation for review]

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • [ ] PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • [ ] Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • [ ] Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.

Screenshots

[if relevant, include a screenshot or screen capture]

lyubomir-popov avatar Jan 22 '24 16:01 lyubomir-popov

Demo starting at https://vanilla-framework-4954.demos.haus

webteam-app avatar Jan 22 '24 16:01 webteam-app

The build fails due to undefined variable. Seems that the $input-border-thickness that you try to use is defined later in the code.

It would have to be moved up. I guess it would make sense to move it to spacing file. Right now it's defined in settings_placeholders (which seems to be a bunch of weird legacy variable definitions).

bartaz avatar Jan 23 '24 14:01 bartaz

Reimplemented in https://github.com/canonical/vanilla-framework/pull/5389

bartaz avatar Oct 21 '24 10:10 bartaz