• When you use inheritance in Less, for example this code:

    .block {
      margin: 10px 5px;
      padding: 2px;
    }
    
    p {
      .block; /* Inherit styles from '.block' */
      border: 1px solid #EEE;
    }
    ul, ol {
      .block; /* Inherit styles from '.block' */
      color: #333;
      text-transform: uppercase;
    }

    it is compiled to

    .block {
      margin: 10px 5px;
      padding: 2px;
    }
    p {
      margin: 10px 5px;
      padding: 2px;
      border: 1px solid #EEE;
    }
    ul,
    ol {
      margin: 10px 5px;
      padding: 2px;
      color: #333;
      text-transform: uppercase;
    }

    What I want to ask, is it OK, to upload such .css file in wordpress.org themes directory? Would it pass a review? Cause it duplicates properties.

The topic ‘Using Less preprocessor’ is closed to new replies.