Пример #1
0
        public override void VisitStructuralPseudoClassSelector(CssStructuralPseudoClassSelector selector)
        {
            VisitPseudoClassSelector(selector);
            _sb.Append('(');

            var useShortForm = false;

            switch (selector.CycleSize)
            {
            case -1:
                _sb.Append("-n");
                break;

            case 0:
                useShortForm = true;
                break;

            case 1:
                _sb.Append('n');
                break;

            default:
                _sb.Append(selector.CycleSize).Append('n');
                break;
            }

            if (useShortForm || selector.Offset < 0)
            {
                _sb.Append(selector.Offset);
            }
            else if (selector.Offset > 0)
            {
                _sb.Append('+').Append(selector.Offset);
            }

            _sb.Append(')');
        }
Пример #2
0
 public virtual void VisitStructuralPseudoClassSelector(CssStructuralPseudoClassSelector selector)
 {
 }
Пример #3
0
 public override void VisitStructuralPseudoClassSelector(CssStructuralPseudoClassSelector selector)
 {
     _matcher = selector;
 }