GithubHelp home page GithubHelp logo

hugotiburtino / css-beautifier Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 212 KB

Firefox extension that beautifies CSS files

License: Other

CSS 54.15% JavaScript 43.66% HTML 2.18%
css-beautifier firefox-extension highlightjs jsbeautifier

css-beautifier's Introduction

CSS Beautifier

Firefox extension that beautifies CSS files

Get it on Firefox Browser ADD-ONS!


Automatically beautifies and colors a CSS file open in a separate tab on Firefox

Build with

Credits

Icon made by Smashicons available at flaticon

css-beautifier's People

Contributors

hugotiburtino avatar

Watchers

 avatar

css-beautifier's Issues

Too much "<br>" at code

The text rendered has too much < br > at its html. That makes the code ugly and could be a problem for a potential 'copy'.

Possible insertion of scripts

The conditions to process the data are not enough to prevent a malicious site to insert an script at the head or at the < pre >.

Unwanted space before each selector

When you copy the whole text, there is one undesired space before each selector, like
_ a { // "_" means here one space before 'a'
// bla bla bla
}
When it was supposed to be
a {
// bla bla bla
}

No auto recognition of CSS files

The CSS Beautifier does not recognize a CSS file that doesn't have the extension ".css"

Indeed, Highlight.js has an auto-detect function, but it does not always work, or at least not enough.

Modification of html of pages, that end with .css without being CSS code

Even though we resolved #4 the issue persists, namely, that html of pages that end with .css get modified
At the following page: https://github.com/hugotiburtino/markdown-viewer/commits/master/ext/menu.css , we can still find a code created by the extension that was supposed to be.

document.getElementsByTagName('code')[0].innerHTML
"<span class=\"hljs-selector-tag\">The</span> <span class=\"hljs-selector-tag\">current</span> <span class=\"hljs-selector-tag\">color</span> <span class=\"hljs-selector-tag\">is</span> <span class=\"hljs-selector-tag\">the</span> <span class=\"hljs-selector-tag\">same</span> <span class=\"hljs-selector-tag\">of</span> <span class=\"hljs-selector-tag\">button</span> <span class=\"hljs-selector-tag\">background</span> <span class=\"hljs-selector-tag\">color</span>, <span class=\"hljs-selector-tag\">what</span> <span class=\"hljs-selector-tag\">makes</span> <span class=\"hljs-selector-tag\">it</span> <span class=\"hljs-selector-tag\">unreadable</span>. <span class=\"hljs-selector-tag\">Resolves</span>: <span class=\"hljs-selector-tag\">KeithLRobertson</span><span class=\"hljs-selector-id\">#68</span>"

In that case it isn't a big deal, since we can't see a difference at the page, but it can become an issue at other pages.

Background color of CSS file history page at GitHub wrongly changed

The extension inteferes with the background color of sites that were not supposed to be used with the application. For example, if you open the history of a CSS file (whose URL ends of course with .css), you can see that the background color is not matching with the rest (a similar behavior to this one)
It will likely occur also at others pages that end with css that aren't (solely) css code

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.