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

Adding sync method to update atrr from inline style updates #9410

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fixing python to_css codegen error

  • Loading branch information
craftytrickster committed May 19, 2016
commit faedeba30fca96885878465a1267f5d276941b4e
@@ -591,7 +591,7 @@ impl Shorthand {

pub fn name(&self) -> &'static str {
match *self {
% for property in SHORTHANDS:
% for property in data.shorthands:
Shorthand::${property.camel_case} => "${property.name}",
% endfor
}
@@ -755,8 +755,8 @@ impl fmt::Display for PropertyDeclarationName {
impl ToCss for PropertyDeclaration {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
match *self {
% for property in LONGHANDS:
% if property.derived_from is None:
% for property in data.longhands:
% if not property.derived_from:
PropertyDeclaration::${property.camel_case}(ref value) =>
value.to_css(dest),
% endif
@@ -833,7 +833,7 @@ impl PropertyDeclaration {
/// This is the case of custom properties and values that contain unsubstituted variables.
pub fn value_is_unparsed(&self) -> bool {
match *self {
% for property in LONGHANDS:
% for property in data.longhands:
PropertyDeclaration::${property.camel_case}(ref value) => {
matches!(*value, DeclaredValue::WithVariables { .. })
},
@@ -954,7 +954,7 @@ impl PropertyDeclaration {
// first generate longhand to shorthands lookup map
<%
longhand_to_shorthand_map = {}
for shorthand in SHORTHANDS:
for shorthand in data.shorthands:
for sub_property in shorthand.sub_properties:
if sub_property.ident not in longhand_to_shorthand_map:
longhand_to_shorthand_map[sub_property.ident] = []
@@ -966,7 +966,7 @@ impl PropertyDeclaration {
%>

// based on lookup results for each longhand, create result arrays
% for property in LONGHANDS:
% for property in data.longhands:
static ${property.ident.upper()}: &'static [Shorthand] = &[
% for shorthand in longhand_to_shorthand_map.get(property.ident, []):
Shorthand::${shorthand},
@@ -975,7 +975,7 @@ impl PropertyDeclaration {
% endfor

match *self {
% for property in LONGHANDS:
% for property in data.longhands:
PropertyDeclaration::${property.camel_case}(_) => ${property.ident.upper()},
% endfor
PropertyDeclaration::Custom(_, _) => &[]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.