Repository navigation
Fix #10532 - #10553
Fix #10532#10553iamajoe wants to merge 18 commits into
Conversation
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon. |
|
Where does that line height value come from? |
|
Comparison with Firefox. Photoshop to check if everything is as supposed. |
| input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; text-align: left; } | ||
| textarea { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: pre; } | ||
| input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: nowrap; text-align: left; line-height: 1.8; } | ||
| textarea { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: pre; } |
There was a problem hiding this comment.
Shouldn't we try to split these properties onto multiple lines? It's awfully hard to meaningfully see the changes in the diff when the style is structured like that.
(I know it was the existing structure; I am just suggesting that we should clean it up. 😄)
There was a problem hiding this comment.
I totally agree. I also find it weird to work with these.
Also... This file will definitely grow so, besides an import system we should maybe start commenting with sections? For example /* Form */.
|
Can you file a follow-up bug to get this added to the spec? https://html.spec.whatwg.org/multipage/rendering.html#form-controls Once that's done, I'm fine with this patch. |
|
Firefox use Do we need a reftest to check these two pages are the same? These two look the same on Firefox. I'm not sure this is in the scope of this bug because even if we set the <div style="line-height: 100px;">
<input placeholder="foobar">
</div><div>
<input placeholder="foobar">
</div> |
|
@aethanyc Yes I noticed that @pcwalton What would you want me to write? I'm not used to write these things :P New to contributing but want to keep on doing it! |
|
(just a unrelated note: please don't name your PR "Fix #xxxx". It makes it a bit difficult to triage PRs and go through github notifications. And thank you for the PR ^^) |
|
@paulrouget Sure. How would you prefer me to name the PR? So that next time I've that in attention? |
|
@Sendoushi I'm new to servo, too. Let's wait servo experts to answer your question. |
|
@Sendoushi It'd be nice if you can have a descriptive title of what the PR is about. Coincidentally, your commit message for this PR is good enough as a PR title. |
|
https://html.spec.whatwg.org/multipage/rendering.html#the-input-element-as-a-text-entry-widget is probably a more appropriate place in the specification to define this. The issue should be filed at https://github.com/whatwg/html/issues . |
|
Yes please. I have no idea on the next steps... |
|
I have filed whatwg/html#1046 as requested. |
|
Given that upstream spec states that this could reasonably be covered under the magic "binding" property, I think it's safe to say the spec allows us to do this today, so r=me. |
|
Oh wait... r=me with a reftest added. |
|
(The spec problem is not so much "are we allowed to this" but "should we be required to do this") |
|
Here is the reftest: #10648 is it ok? |
This is a new attempt of servo#10586, after Simon Sapin's great cleanups in servo#10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
They're not stable enough right now, with no expectation of improvement any time soon.
|
@notriddle checked that but it is hard to spot my commits now. |
|
What does Also, |
|
@perlun yes, servo remote is "upstream". I tried -i but the problem with that is that i already have a lot of commits which aren't my own and it is pretty hard for me to go through each commit. I guess at this point I should just re-fork and re-do the whole thing. |
|
Try 'git rebase upstream/master' and then force push. Should do the trick, no? |
|
That makes sense. Pulled upstream/master (everything up to date), rebase upstream/master it and conflict errors on |
|
Something is horribly wrong, not only do I see multiple commits, I see commits that are not from the PR author. |
|
Weird. I'll see if I can sort it out. |
|
@Sendoushi - I think I got the branch fixed. The steps I took:
The last one is a change I've made; I don't know how it made its way there. 😄 It's already merged into servo upstream, but I kept the line anyway and let the rebase start. I got an error when it attempted to apply that commit; it wouldn't apply cleanly. Since I knew it's already merged and doesn't belong to your branch anyway, I decided to skip it and let the rebase continue: The rebase was successfully completed. I pushed the result to my own fork: And then I created the PR. Since I rebased your commits, they still have you as the author and you should get the credit you (rightfully) deserve. Hope this helped! 😄 |
|
@perlun it helped :) rebase is still a mysterious wizardry for me |
|
@Sendoushi - it's one of the hardest parts of git perhaps, but don't be afraid: you can learn it as well. I happen to use it more or less every day in my work so I'm very used to the workflow. (Think of rebase as "replay the commits from my current branch on top of some other commit than the commit I branched out from. Problems can occur if you rebase on top of the wrong commit etc, but once you learn it, it's one of the things with git that you tend to like the most.) |
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
Fixed line-height for input and textarea + use correct font Fixes #10532. Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged. (Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809) <!-- Reviewable:end -->
As discussed in servo#10553, we should consider splitting the long lines in this file onto separate lines (one per css attribute), to make it more readable and maintainable in general. I also added blank lines where I felt it was applicable.
Reformatted servo.css - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because it doesn't introduce new functionality. ---- As discussed in #10553, we should consider splitting the long lines in this file onto separate lines (one per css attribute), to make it more readable and maintainable in general. I also added blank lines where I felt it was applicable. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11186) <!-- Reviewable:end -->
As discussed in servo#10553, we should consider splitting the long lines in this file onto separate lines (one per css attribute), to make it more readable and maintainable in general. I also added blank lines where I felt it was applicable.
This change is