D. Joe 397f3b2e88 | 4 years ago | |
---|---|---|
.. | ||
css | 4 years ago | |
icons | 4 years ago | |
README.md | 4 years ago | |
activitypalette.html | 4 years ago | |
activitypalette.js | 4 years ago | |
grid.js | 4 years ago | |
icon.js | 4 years ago | |
journalchooser.js | 4 years ago | |
menupalette.html | 4 years ago | |
menupalette.js | 4 years ago | |
palette.js | 4 years ago | |
presencepalette.js | 4 years ago | |
radiobuttonsgroup.js | 4 years ago | |
xocolor.js | 4 years ago |
Sugar widgets and graphics, implementing the Sugar Interface Guidelines.
We use LESS and then compile the CSS files. This is to be able to use calculations and variables for colors and measures. And to be able to output different CSS files for different screen resolutions.
To compile the CSS files do:
lessc graphics/css/sugar-96dpi.less graphics/css/sugar-96dpi.css
lessc graphics/css/sugar-200dpi.less graphics/css/sugar-200dpi.css
Be sure to compile them before commit.
The grid is a visual debug tool that allows you to check if the elements have the correct size. To activate the grid, open the inspector console and paste the following.
If RequireJS is not in the page head (ie. in the sugar-web-samples), load it:
var script = document.createElement('script');
script.src = 'lib/require.js';
document.head.appendChild(script);
requirejs.config({ baseUrl: "lib" });
Then do:
require(["sugar-web/graphics/grid"], function (grid) { grid.addGrid(11) });