Giter VIP home page Giter VIP logo

rafaelcaricio / gradient-inspector Goto Github PK

View Code? Open in Web Editor NEW
166.0 9.0 9.0 526 KB

Chrome extension that provides a friendly way to inspect gradients of an element.

Home Page: https://chrome.google.com/webstore/detail/css-gradient-inspector/blklpjonlhpakchaahdnkcjkfmccmdik

License: MIT License

JavaScript 49.53% CSS 10.81% Makefile 0.39% HTML 39.27%
chrome-extension javascript gradients css

gradient-inspector's Introduction

CSS Gradient Inspector

Code Climate

With the addition of a sidebar to Developer Tools, the Chrome Extension displays gradients applied to the inspected element. Toggle each gradient (which are different layers) individually.

Installation

You can install this plugin via Chrome Web Store or Opera Addons Page.

Development instructions

If you wanna make any modifications to this plugin you can use the utility file that can be found at test/development.html. It will run the actual extension code in the one page including the javascript inspection code. You can modify the extension code and just refresh that page. This development code was created because it is very difficult to debug errors in the extension when it is installed in Chrome.

You need a webserver to load the test/development.html file properly in your browser. You can run:

make

Then access http://localhost:8080/test/development.html in your Chrome browser.

gradient-inspector's People

Contributors

gilmoreorless avatar rafaelcaricio avatar ysa134 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradient-inspector's Issues

Support background-size

Gradients are sometimes used in combination with background-size to create repeating patterns. It would be great to have support for this in the inspector - perhaps as a toggle option.

Do not inject inline styles in the inspected element

I would like to not have any styles injected inline in the inspected element. When I select/unselect the gradients to be displayed it should override the original definition.

Possible solutions:

  • Save the original definition for the element style in the localStorage and then modify the original CSS definition.
  • Create a high priority CSS definition and modify it when user change the gradients.

Submit to Opera extensions catalog

Nice work on this!

Would you mind submitting your extension to https://addons.opera.com/en/? It should be compatible so it’s just a matter of uploading the same package to our catalog as well —no code changes needed. That way, Opera users can benefit from your work as well.

Thanks in advance for considering this.

Inspector breaks on elements with `url()` background-image values

Gradient Inspector delegates to Gradient Parser for getting gradient values, but Gradient Parser only handles gradient values.

If I have an element with multiple backgrounds, and one of them is a non-gradient image, Gradient Inspector fails to render the backgrounds due to an error thrown by Gradient Parser.

Example in code form:

.this-works {
  background-image: linear-gradient(...), linear-gradient(...);
}

.this-breaks {
  background-image: url(http://...), linear-gradient(...);
}

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.