Comments (5)
Fantastic suggestion. Thank you. The only reason for the dashes in front were to break up the blocks visually.
from csscss.
@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.
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.
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.
@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)
- Terminology HOT 4
- Unable to install HOT 4
- "command not found: csscss" HOT 3
- Include SASS files from the cli HOT 7
- fail on import of Compass plugin HOT 3
- Don't know what to do with "@keyframes" HOT 2
- Line numbers HOT 1
- less @import statements with relative paths fail HOT 1
- undefined method `downcase' HOT 8
- csscss has problems with unicode even when ruby version is 2.0 HOT 1
- Add Gulp extension to community extensions HOT 1
- http://connectionrequired.com/ is down HOT 1
- csscss hanging/giving no output HOT 2
- No check for duplicate selector HOT 1
- Duplicate CSS selectors not returned int result HOT 1
- Multiple Rulesets with exact same Selector HOT 1
- Community extension: csscssbeauty
- Comments/charset declarations are included in selectors
- charset followed by comment with code inside raises error
- Requirement of saas Gem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csscss.