Skip to content

fix: thin lines are rendered inconsistently#4615

Merged
johnleider merged 3 commits intovuetifyjs:masterfrom
alexhx5:master
Jul 17, 2018
Merged

fix: thin lines are rendered inconsistently#4615
johnleider merged 3 commits intovuetifyjs:masterfrom
alexhx5:master

Conversation

@alexhx5
Copy link
Contributor

@alexhx5 alexhx5 commented Jul 14, 2018

Description

fixes #3847
fixes #3588
fixes #3090

Currently all thin lines in Vuetify components look inconsistent and confusing (depends on the page zoom and element position on the page):

  • Some lines are rendered too thick
  • Some lines become invisible

The problem occurs because of approximation in rendering which becomes noticable for thin elements (e.g. v-divider, v-divider vertical, v-select, v-input-field)

There's currently only 1 solution to this problem - to use borders as lines.

It fixes the problem on all Chromium and Firefox browsers (and possibly on Safari, haven't tested).

How Has This Been Tested?

Visually:
Codepen example: https://codepen.io/anon/pen/yqYdbB?editors=1100

  • Open the link
  • Change the page zoom around (50% - 200%) to notice the problem with lines (some will dissapear, some will become thicker)
  • Un-comment CSS to see the fix in action

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have created a PR in the documentation with the necessary changes.

fix: thin lines are rendered inconsistently
@@ -159,11 +159,15 @@ rtl(v-text-field-rtl, "v-text-field")
background-position: bottom
background-size: 3px 1px
background-repeat: repeat-x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyone know what all this crap is for? Probably isn't needed any more if we're using borders now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for disabled styles

Removed unnecessary `height` rules, increased border width to 2px for `box` input (I accidentally made it 1px initially)
@codecov
Copy link

codecov bot commented Jul 14, 2018

Codecov Report

Merging #4615 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4615      +/-   ##
==========================================
- Coverage   90.17%   90.12%   -0.05%     
==========================================
  Files         206      206              
  Lines        4914     4923       +9     
  Branches     1246     1251       +5     
==========================================
+ Hits         4431     4437       +6     
- Misses        387      389       +2     
- Partials       96       97       +1
Impacted Files Coverage Δ
src/components/VSnackbar/VSnackbar.js
src/components/VSnackbar/index.js
...mponents/VExpansionPanel/VExpansionPanelContent.js
src/components/VExpansionPanel/index.js
src/components/VExpansionPanel/VExpansionPanel.js
...mponents/VExpansionPanel/VExpansionPanelContent.ts 85.29% <0%> (ø)
src/components/VExpansionPanel/index.ts 100% <0%> (ø)
src/components/VSnackbar/index.ts 100% <0%> (ø)
src/components/VExpansionPanel/VExpansionPanel.ts 93.33% <0%> (ø)
src/components/VSnackbar/VSnackbar.ts 95.23% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52f7357...23aef69. Read the comment docs.

Removed unnecessary styles: `height, min-height, width, min-width`. 
We don't really need them if we're drawing lines as borders
@johnleider johnleider merged commit 7cd89ea into vuetifyjs:master Jul 17, 2018
KaelWD added a commit that referenced this pull request Jul 18, 2018
KaelWD added a commit that referenced this pull request Jul 18, 2018
see #4615

still need to figure out something with background-image, but this'll do for now
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
see vuetifyjs#4615

still need to figure out something with background-image, but this'll do for now
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
see vuetifyjs#4615

still need to figure out something with background-image, but this'll do for now
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
see vuetifyjs#4615

still need to figure out something with background-image, but this'll do for now
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
YoanChapron pushed a commit to YoanChapron/vuetify that referenced this pull request Jul 18, 2018
see vuetifyjs#4615

still need to figure out something with background-image, but this'll do for now
DoritoBandito pushed a commit to DoritoBandito/vuetify that referenced this pull request Jul 18, 2018
@lock
Copy link

lock bot commented Apr 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

3 participants