Giter VIP home page Giter VIP logo

Comments (3)

panoply avatar panoply commented on May 26, 2024

Update

Applying the logic for this beautification rule. The finalized schema and accepted options are as follows:

Options Description
preserve All tag attribute keys/values are preserved (default)
lowercase All tag attribute keys/values are converted to lowercase
lowercase-name Only attribute names are converted to lowercase
lowercase-value Only attribute values are converted to lowercase

Finalised Changes

The lowercase-name will be used instead of lowercase-keys and lowercase-value opposed to lowercase-values. There should be a clear separation of naming conventions here. When describing a HTML attribute, it is more common to refer to data-attr as a name instead of key. Relating to the removal of pluralised values this is merely a matter of preference.

from esthetic.

panoply avatar panoply commented on May 26, 2024

Finalised Shipment

This will conclude the new ruleset of attributeCasing. The formatting option supports Liquid contained html attributes and HTML attributes. Below is the finalised examples:

Input

<div {% if %}DATA-{{ x }}-FOO{% else %}ID="BAR"{% endif %}></div>

Output - preserve

<div CLASS="XX" {% if %}DATA-{{ x }}-FOO{% else %}ID="BAR"{% endif %}></div>

Output - lowercase

<div class="xx" {% if %}data-{{ x }}-foo{% else %}id="bar"{% endif %}></div>

Output - lowercase-name

<div class="XX" {% if %}data-{{ x }}-foo{% else %}id="BAR"{% endif %}></div>

Output - lowercase-value

<div CLASS="xx" {% if %}DATA-{{ x }}-FOO{% else %}ID="bar"{% endif %}></div>

from esthetic.

panoply avatar panoply commented on May 26, 2024

Solved in 0.3.0.beta

from esthetic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.