alkostuchkov f29a7c4429 Init commit: added my dotfiles | il y a 3 ans | |
---|---|---|
.. | ||
css | il y a 3 ans | |
sites | il y a 3 ans | |
styl | il y a 3 ans | |
themes | il y a 3 ans | |
LICENSE | il y a 3 ans | |
Makefile | il y a 3 ans | |
README.org | il y a 3 ans | |
make.py | il y a 3 ans | |
release.sh | il y a 3 ans | |
screenshot.js | il y a 3 ans |
This is a small (growing?) collection of user-stylesheets based upon the Solarized theme (repo). It uses Stylus to generate the CSS. The home of this stylesheet is at https://github.com/alphapapa/solarized-everything-css.
Wouldn't it be nice if (almost) every web site looked Solarized? I thought so. So here is a start. :)
You may install some of the stylesheets directly in your browser from userstyles.org:
Install the stylesheet of your choice according to your browser's method (e.g. using the Stylish extension in Firefox).
CSS files for each theme are in the css
directory.
theme-all-sites-*.css
theme-generic-*.css
theme-mediawiki-*.css
theme-disqus-*.css
theme-github-*.css
theme-google-*.css
theme-hackernews-*.css
theme-planet.emacsen.org-*.css
theme-stackexchange-*.css
theme-sakai-*.css
To make changes, just edit the =.styl= files and run make
. (You need to have Stylus installed, of course.)
Basically, nearly the only things that should be in themes/*/*.styl
should be theme specific colors. Everything else should go in sites/*.styl
. Colors are defined as color-
variables, and mixins are used to insert common CSS properties (like color
, background
, etc) with =!important=. Most changes can be made without inserting CSS properties directly into the selectors.
I highly recommend using Emacs with stylus-mode
and outline-minor-mode
, but, of course, you can use whatever you like. :)
It's a good idea to avoid the use of *
selectors wherever possible. They tend to have unanticipated side-effects which can take time to track down.
Stylus can be very confusing when it comes to importing/requiring sheets into other sheets. Unfortunately, the order in which they are imported does matter, as each one seems to be parsed and executed in-order, rather than importing them all at once and then having a global namespace.
This is how the sheets require
in this project:
Makefile
*/{dark,light}.styl
(in Makefile syntax: $$color.styl
)colors
{dark,light}.styl
styl
(which loads styl/index.styl
)mixins
sites/*.styl=: The site-specific sheets, as well as =generic.styl
, which applies to all of them, and also builds as a separate sheet for non-specific sites. all-sites.styl
puts all of the site-specific sheets into one big CSS file, which some people may prefer over setting up custom CSS for each site in their browser. Styles starting with _
will not be included in all-sites.styl
This way, the color value-name mappings are loaded first, after which those friendly names can be used in the files that actually style elements and pages.
It's easy to add your own themes:
themes/
directory, giving it a new name.make
in the project root directory to build the CSS files.This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.txt.