Package com.github.sommeri.less4j.core.ast

Examples of com.github.sommeri.less4j.core.ast.GeneralBody


    switch (parent.getType()) {
    case STYLE_SHEET: {
      return true;
    }
    case GENERAL_BODY: {
      GeneralBody body = (GeneralBody) parent;
      ASTCssNode bodyParent = body.getParent();
      return bodyParent == null || bodyParent.getType() == ASTCssNodeType.MEDIA;
    }
    default:
      //nothing is needed
    }
View Full Code Here


    }
  }

  private void putMediaBodyIntoRuleset(Media media, List<Selector> selectors) {
    RuleSet newRuleset = new RuleSet(media.getUnderlyingStructure(), media.getBody(), selectors);
    GeneralBody newMediaBody = new GeneralBody(media.getUnderlyingStructure());
    newMediaBody.addMember(newRuleset);
    media.setBody(newMediaBody);

    newMediaBody.configureParentToAllChilds();
    media.configureParentToAllChilds();
    newRuleset.configureParentToAllChilds();
  }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.core.ast.GeneralBody

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.