Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking change] default shadow blur value should be 0 (and not 1px) #119

Closed
KimDal-hyeong opened this issue Jun 24, 2018 · 2 comments
Closed
Assignees
Milestone

Comments

@KimDal-hyeong
Copy link
Member

KimDal-hyeong commented Jun 24, 2018

2018-06-25 12 56 49

The default value of blur in addInnerShadow is 1.
Therefore, there is a problem that blur is applied.

two solutions.

The first is to add blur: 0 in code of one-side border.

if (borderTopWidthFloat !== 0) {
    style.addInnerShadow({color: borderTopColor, offsetY: borderTopWidthFloat, blur: 0});
}

Or, if blur's default has no reason. We can change it to 0.

addInnerShadow({color = '#000', blur = 0, offsetX = 0, offsetY = 0, spread = 0}) {
...

What do you think about this?

@KimDal-hyeong KimDal-hyeong changed the title One-side border had 1px blur. One-side border have 1px blur. Jun 24, 2018
@kdzwinel
Copy link
Collaborator

Good catch! I fixed it using your first suggestion:

https://github.com/brainly/html-sketchapp/releases/tag/v3.3.1

However, I have no idea why blur=1 is the default. We should change it to 0 (for both inner and outer shadow). It will be a breaking change, but IMO current default doesn't make much sense.

@kdzwinel kdzwinel changed the title One-side border have 1px blur. [Breaking change] default shadow blur value should be 0 (and not 1px) Jun 25, 2018
@kdzwinel kdzwinel added enhancement and removed bug labels Jun 25, 2018
@kdzwinel kdzwinel modified the milestones: 3.4.0, 4.0.0 Jun 25, 2018
@kdzwinel kdzwinel self-assigned this Jul 12, 2018
@kdzwinel
Copy link
Collaborator

Fixed by 70aa822

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

No branches or pull requests

2 participants