Cascading Style Sheets
CSS is a language to describe styling of document. CSS is widely used in HTML world, every web pages now have a CSS attached. If you don't known at all CSS, you can start by searching and reading a tutorial css first. PyMT uses CSS to let you customize the way widgets appear when you run an application. This way you can completely customize the look and feel of your applications.
But PyMT use CSS only as a support. That's mean our CSS language don't follow exactly the CSS of HTML. We have more tokens available, and don't support all CSS syntax.
If you create a file called user CSS in the PyMT home directory (
USER_HOME/.pymt). PyMT will automatically load it after it loads the default CSS.
bg-color: rgba(255, 127, 0, 127);
This is the contents of the default CSS file used by PyMT internally. The specific contents may change with version, and this here might not be up to date. But it should be able to give you a pretty good idea of how the CSS style sheets work with PyMT, which properties you can set, and how to specify the values. You can found the latest PyMT CSS version on github.
/* text color */
color: rgba(255, 255, 255, 255);
/* color when something is pushed */
color-down: rgba(150, 150, 150, 150);
/* background color of widget */
bg-color: rgba(60, 60, 60, 150);
/* fonts */
font-weight: normal; /* normal, bold, italic, bolditalic */
font-color: rgba(255, 255, 255, 255);
/* borders */
/* background alpha layer */
alpha-background: 1 1 0.5 0.5;
/* text shadow */
text-shadow-color: rgba(22, 22, 22, 63);
text-shadow-position: -1 1;