Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStylo: Implement font-variant-caps #13668
Comments
|
Please make a comment here if you intend to work on this issue. Thank you! |
|
Hello people! I would like to take this on. Also should i submit PR to the stylo-flat repo as I am starting out? |
|
Actually, this one is trickier. It needs to be manually implemented. So the change will be more like https://github.com/servo/servo/pull/13570/files It is preferable if you submit the pull request to Servo. You can submit to stylo-flat if you think that's easier. |
|
You'll also need to expand the list of possible values, right now it only takes two of the ones listed in the issue above. |
|
It can now be implemented using |
|
Any updates? |
|
Yes, currently working on a PR with changes similar to https://github.com/servo/servo/pull/13570/files. I will need some more help to check after submission. |
|
I will need to contact some one in the IRC, doing |
|
It's |
|
I have added all values from the MDN for the existing font-variant in font.marko.rs. I am guessing no other changes in this file. As pointed out, I guess the manual glue needs to be added in the gecko.marko.rs file. Also the pointed I tried creating a similar function in gecko.marko.rs modifying the set_font_stretch function to set_font_variant and its properties. I ran Any directions on how to make the gecko glue manually would be great! |
|
@vgvenkat Sorry, I forgot to ping you. That PR has landed. Are you planning to work on this? |
|
This is open for anyone to jump in. All we have to do is build a constants map just like what we do for |
|
Reading the guide and taking a glance at this later today so I would like to claim it if that is alright. Thanks. |
|
Yes please... |
|
Am I wrong in assuming I just need to insert the following code into
After adding that, my build fails because method Font_variant_caps is not a member of trait 'CSSStyleDeclarationMethods' |
|
There needs to be a Please see the guide. You have to test this using a clone of the Stylo repository. It is not enough to just add that code and submit it. |
|
Also, note that the generated constants will have incorrect names. This should be done just like |
font-variant-caps implemented in font.mako.rs <!-- Please describe your changes on the following line: --> Implemented font-variant-caps for gecko library --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13668 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Not sure. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Before Change: <img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG"> After Change: <img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png"> Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14561) <!-- Reviewable:end -->
font-variant-caps implemented in font.mako.rs <!-- Please describe your changes on the following line: --> Implemented font-variant-caps for gecko library --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13668 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Not sure. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Before Change: <img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG"> After Change: <img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png"> Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14561) <!-- Reviewable:end -->
font-variant-caps implemented in font.mako.rs <!-- Please describe your changes on the following line: --> Implemented font-variant-caps for gecko library --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13668 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Not sure. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Before Change: <img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG"> After Change: <img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png"> Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14561) <!-- Reviewable:end -->
font-variant-caps implemented in font.mako.rs <!-- Please describe your changes on the following line: --> Implemented font-variant-caps for gecko library --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13668 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Not sure. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Before Change: <img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG"> After Change: <img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png"> Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14561) <!-- Reviewable:end -->
font-variant-caps implemented in font.mako.rs <!-- Please describe your changes on the following line: --> Implemented font-variant-caps for gecko library --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13668 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Not sure. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Before Change: <img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG"> After Change: <img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png"> Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14561) <!-- Reviewable:end -->
font-variant-caps implemented in font.mako.rs <!-- Please describe your changes on the following line: --> Implemented font-variant-caps for gecko library --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13668 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Not sure. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Before Change: <img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG"> After Change: <img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png"> Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14561) <!-- Reviewable:end -->
font-variant-caps implemented in font.mako.rs <!-- Please describe your changes on the following line: --> Implemented font-variant-caps for gecko library --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13668 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ Not sure. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Before Change: <img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG"> After Change: <img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png"> Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14561) <!-- Reviewable:end -->
Please go through the guide before working on this issue.
font-variant-capsis a keyword property which takes one of the following values:normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps. The default value isnormal. The linked MDN has more information about this.The constant prefix you should be using is
NS_FONT_VARIANT_CAPSCode:
servo/components/style/properties/longhand/font.mako.rs