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

Support all CSS units #445

Closed
brson opened this issue May 14, 2013 · 7 comments
Closed

Support all CSS units #445

brson opened this issue May 14, 2013 · 7 comments

Comments

@brson
Copy link
Contributor

@brson brson commented May 14, 2013

I think we only really us px at the moment. Make pt, em and other units work correctly everywhere.

  • Distance Units: the ‘<length>’ type
    • Relative lengths
      • Font-relative lengths:
        • em
        • ex (as 0.5em)
        • ch (as 0.5em)
        • rem
      • Viewport-percentage lengths:
        • vw
        • vh
        • vmin
        • vmax
    • Absolute lengths:
      • cm
      • mm
      • in
      • pt
      • pc
      • px
  • Other Units
    • Angles: the ‘<angle>’ type and:
      • deg
      • grad
      • rad
      • turn
    • Times: the ‘<time>’ type and:
      • s
      • ms
    • Frequencies: the ‘<frequency>’ type and:
      • Hz
      • kHz
    • Resolutions: the <resolution> type and:
      • dpi
      • dpcm
      • dppx
@0b10011
Copy link
Contributor

@0b10011 0b10011 commented Aug 29, 2013

em works everywhere I've noticed.

I'm also working to add support for ex at the moment, and if all goes smoothly, I'll continue on to the others. New to Rust and Servo, so it's slow going, but getting there.

List of units:
Moved to issue description (nox)

@metajack
Copy link
Contributor

@metajack metajack commented Aug 29, 2013

I believe the idea is that the style system should be normalizing all these units into a small subset. @SimonSapin is working on the new style system right now and may have more input here.

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Aug 29, 2013

There is no need to "add" non-length units as long as there is no property or other CSS feature that use them. My new style system already supports all absolute length units, em, and ex. (The latter is implemented as 0.5em, which is allowed the spec but is not great.)

@0b10011
Copy link
Contributor

@0b10011 0b10011 commented Aug 29, 2013

@SimonSapin Should I not bother with this issue then? Perhaps off of your branch? I implemented ex as .5em and was just gonna start investigating how to properly implement it.

If not, what's something I can help with (being new to Rust and Servo)? I don't want to start working on something else that's already being worked on. I noticed https://github.com/mozilla/servo/wiki/Work-items-for-new-contributors, but are all of these things available? Or are they being worked on without the issue being updated accordingly?

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Aug 29, 2013

I’m working on a new style system meant to replace rust-css and Netsurf’s libcss in servo, so any work on rust-css will probably end up duplicated. My priority is to land this new system without regressing too much, before spending much time on new features. For example, implementing ex as 0.5em is easy enough to do right now, but doing it properly requires loading fonts and is much more involved.

As to what you can help with, have a look at issues labeled E-easy.

@nox nox added the A-content/css label Aug 30, 2015
glennw pushed a commit to glennw/servo that referenced this issue Jan 16, 2017
Image mask support

Closes servo#405

I'm not completely sure if this is the right approach, hoping to get some review/feedback to proceed. The API and logic works for me with `wr_sample`, although the implementation lacks a lot of features to support, like image repeating and layout transformations.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/445)
<!-- Reviewable:end -->
@nox
Copy link
Member

@nox nox commented Sep 29, 2017

@SimonSapin Can this be closed?

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Sep 29, 2017

Yes.

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

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.