Beispiel #1
0
        public override float GetDecimal(RenderableData context, CssProperty property)
        {
            // Get the parent:
            float parent = context.ResolveParentDecimal(Css.Properties.FontWeight.GlobalProperty);

            // (see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight):

            if (parent < 600f)
            {
                return(100f);
            }
            else if (parent < 800f)
            {
                return(400f);
            }

            return(700f);
        }
Beispiel #2
0
 public override float GetDecimal(RenderableData context, CssProperty property)
 {
     return(context.ResolveParentDecimal(property) * 0.66f);
 }