Check the compliance of your design guidelines within seconds
What is lint?
Linting is the process of running a piece of code that will analyze the system for potential errors. This program checks the source code for Programmatic and Stylistic errors. The idea here was to create a similar tool for reviewing the design.
While leading the designs for the consumer app at Practo, I realized the redundant work being done while maintaining and validating style guides. This entire process was being done manually which was time-consuming and not precise. This plugin works exactly like how a lint for code works. You type in your rules, and it would analyze your designs for any potential errors.
Currently, the plugin can check for typography, color, spelling and contrast issues.
The plugin checks for font size, font-color, font-face and line height.
Validate the color of any layer with your guideline color palette.
Check the spelling of your text layers directly from Sketch. Just run the plugin once. The plugin is using OSX's dictionary to check for spelling mistakes.
This helps you get the accessibility score of the text layers based on readability and contrast formula according to W3C standards.
- Select a text layer and background layer. The plugin calculates the score for the text layer in comparison to the background layer.
- Select just the text layer. This fetches the score in comparison with the background color of the artboard.
- Download this plugin
- Double click the plugin file to automatically install
- The shortcut should now be available under the Plugin's menu in Sketch
How to use?
- Go to Plugins Menu -> Manage Plugins...
- Click the "gear" icon at the bottom -> "Reveal Plugins Folder"
- Right Click "Lint for design" -> "Show package contents"
- Go to Content -> Sketch
- Open "script.js" in any text editor
- Replace the colors and rules according to your styleguide. All fields to be filled are commented with ###.
- Your plugin is good to go :D
- I'm working on a way to add the rules by not making changes to the code.
- Adding more rules to check for (padding, components etc)
Saransh : @SaranshSolanki