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

[html5] fix border & border-width for less than 1px. #2059

Merged

Conversation

MrRaindrop
Copy link
Member

for styles like:

border-width: 1;
border: 1 solid red;

when window inner width is less than 750, then the 1 will be replaced by a value less than 1. The screen will not display the border less than 1px. This pr fix this issue.

@@ -18,7 +18,11 @@ export function getFilters (key, config) {
}
return {
number: function (val) {
return val * config.scale + 'px'
val = val * config.scale
if (key.match(/^borderWidth/) && val < 1) {
Copy link
Member

Choose a reason for hiding this comment

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

What if border-top-width ?

Maybe /^border(Top|Bottom|Left|Right)?Width$/ is more reliable.

@Hanks10100 Hanks10100 merged commit 3eb34b9 into alibaba:html5-feature-0.5 Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants