Giter VIP home page Giter VIP logo

Comments (5)

zmoazeni avatar zmoazeni commented on June 14, 2024

Fantastic suggestion. Thank you. The only reason for the dashes in front were to break up the blocks visually.

from csscss.

zmoazeni avatar zmoazeni commented on June 14, 2024

@kezabelle I'm not going to change this with the next release, but I'd like to play around with some ideas first. My initial reaction is that without the hyphen in the front, it'll be tough to visually parse each "block" of data. That may be better with the color support. Not sure.

Thoughts?

from csscss.

kezabelle avatar kezabelle commented on June 14, 2024

Certainly the colourised output doesn't seem hard to parse, at least to me. It's definitely a bit harder with --no-color

Double-newlines before every {x} and {y} share N rules might help, or hyphens repeated (eg: ------...) for the column count of the terminal?

For my purposes, I've been piping the output to a file anyway, so that I can go through them without using the terminal scrollback, and that obviously lacks colour. It's not the easiest to parse visually, I agree, but as it's no longer transient (being in a file), it's less of an issue to spend the time doing so.

from csscss.

kezabelle avatar kezabelle commented on June 14, 2024

The other alternative is to completely change the output, to output actual CSS, which would be a bold step.

Where it currently says, {selector 1}, {selector 2}, {selector 3}, {selector 4} share N rules and there follows a list of said rules, it could feasibly be transformed into a real CSS target, eg:

selector 1,
selector 2,
selector 3,
selector 4 {
    shared-rule: 1;
    shared-rule-2: value;
}

[... next intersection ...]

The refactoring would then simply be a case of deciding on a shared class name to replace the comma separated list of existing selectors, and doing the same updating discussed in the original issue.

The workflow at this point would be something like:

  • run csscss on your code;
  • pipe the output to a new file whatever.css;
  • choose new class names for everything in whatever.css;
  • add classes to the appropriate places in HTML;
  • remove shared rules from the original selectors.

from csscss.

zmoazeni avatar zmoazeni commented on June 14, 2024

@kezabelle I'm not sure about that direction. Consolidating rules certainly is one way to solve it. Having awareness and refactoring styles other ways can be another.

One thing else we need to consider is being able to output file name and line numbers from #39

from csscss.

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.