The WordPress Twenty Fifteen Stylesheet - dummies

The WordPress Twenty Fifteen Stylesheet

By Lisa Sabin-Wilson

Every WordPress theme includes a style.css file. A browser uses this file, commonly known as the stylesheet, to provide style to the website design, such as font types, colors, and sizes; graphics; icons; background colors; borders; and other styling elements.

The stylesheet targets areas of the site to style using CSS IDs and classes. CSS IDs and classes are simply a means of naming a particular element of the site. IDs are used for elements that appear only once on a page, whereas classes can be used as many times as you need. Although this file references style, it contains much more information about the theme.

At the very beginning of the style.css file, a comment block, or the stylesheet header, passes information about your theme to WordPress. Comments are code statements included only for programmers, developers, and others who read the code. Computers tend to ignore comment statements entirely, but WordPress uses the stylesheet header to get information about your theme.

In CSS, comments always begin with a forward slash (/) followed by a star (*), and always end with a star followed by a forward slash (*/). The following code listing shows an example of the stylesheet header for the Twenty Fifteen theme:

Theme Name: Twenty Fifteen
Theme URI:
Author: the WordPress team
Author URI:
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen’s simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. Wedesigned it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
Version: 1.2
License: GNU General Public License v2 or later
License URI:
Tags: black, blue, gray, pink, purple, white, yellow, dark, light, two-columns, left-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
Text Domain: twentyfifteen
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you’ve learned with others.

If you modify the stylesheet comments, the changes are reflected on the WordPress Dashboard on the Themes page (choose Appearance → Themes).

Themes must provide this information, by way of comments, in the stylesheet header, and no two themes can have the same information. Two themes with the same name and details would conflict in the Manage Themes page. If you create your own theme based on another theme, make sure you change this information first.

Below the stylesheet header are the CSS styles that drive the formatting and styling of your theme.