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
Generate html and json of supported css properties. #10208
Merged
+69
−3
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e576fe9
Generate html and json of supported css properties.
jrasanen dbb5d11
HTML generation with Mako instead of JS
jrasanen 8e2af4c
Fixed script to output the JSON and create doc directory.
jrasanen 5098ad7
Changed mach test to use generated json file of properties
jrasanen 6de7228
Fixed a typo
jrasanen File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
Generate html and json of supported css properties.
Outputs html and json file of supported css properties to target/doc/ directory when deploying github-pages.
- Loading branch information
commit e576fe94b249b80cb7a63426253db98dee8e629e
| @@ -0,0 +1,67 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta name="generator" content="rustdoc"> | ||
| <meta name="description" content="API documentation for the Rust `servo` crate."> | ||
| <meta name="keywords" content="rust, rustlang, rust-lang, servo"> | ||
| <title>Supported CSS properties - servo - Rust</title> | ||
| <link rel="stylesheet" type="text/css" href="../rustdoc.css"> | ||
| <link rel="stylesheet" type="text/css" href="../main.css"> | ||
| </head> | ||
| <body class="rustdoc"> | ||
| <!--[if lte IE 8]> | ||
| <div class="warning"> | ||
| This old browser is unsupported and will most likely display funky | ||
| things. | ||
| </div> | ||
| <![endif]--> | ||
| <section id='main' class="content mod"> | ||
| <h1 class='fqn'><span class='in-band'>CSS properties currently supported in <a class='mod' href=''>Servo</a></span></h1> | ||
| <div id='properties' class='docblock'> | ||
| <em>Loading</em> | ||
| </div> | ||
| </section> | ||
|
|
||
| <script src="../jquery.js"></script> | ||
| <script> | ||
jrasanen
Author
Contributor
|
||
| (function() { | ||
| "use strict"; | ||
| // | ||
| // Renders list of properties into a table. | ||
| // | ||
| function updatePropertyList (properties) { | ||
| var compiledTable = $('<table></table>'); | ||
| var header = $('<tr></tr>'); | ||
| header.append('<th>Property</th>'); | ||
| header.append('<th>Flag</td>'); | ||
| header.append('<th>Shorthand</th>'); | ||
| compiledTable.append(header); | ||
| for (var property in properties) { | ||
| if (properties.hasOwnProperty(property)) { | ||
| var tr = $('<tr></tr>'); | ||
| tr.append('<td>' + property + '</td>'); | ||
| if (!properties[property].flag) { | ||
| tr.append('<td>-</td>'); | ||
| } else { | ||
| tr.append('<td>' + properties[property].flag + '</td>'); | ||
| } | ||
| tr.append('<td>' + properties[property].shorthand + '</td>'); | ||
| compiledTable.append(tr); | ||
| } | ||
| } | ||
| $('#properties').html(compiledTable); | ||
| } | ||
| $.get('./css-properties.json').success(updatePropertyList).error(function () { | ||
| $('#properties').html("<p>Unable to load json.</p>"); | ||
| }); | ||
| }()); | ||
| </script> | ||
| </body> | ||
| </html> | ||
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Since this is a Mako template that has
propertiesavailable, could Mako generate the HTML table directly, without JavaScript?