Title: css variables with style.php
Last modified: August 20, 2016

---

# css variables with style.php

 *  [Bruce](https://wordpress.org/support/users/bnowthen/)
 * (@bnowthen)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/css-variables-with-stylephp/)
 * I’m trying out this example from [http://www.barelyfitz.com/projects/csscolor/](http://www.barelyfitz.com/projects/csscolor/)
 * I put the html file and the style.php file in the same folder, copying the style.
   php straight from the example, but get no results as you can see at [http://neighborsconnect.us/test/css-variables.html](http://neighborsconnect.us/test/css-variables.html)
 * The html file:
 *     ```
       <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
       <html>
       <head>
         <title>CSS Variables</title>
         <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
         <link rel="stylesheet" type="text/css" media="screen" href="style.php">
       </head>
       <body>
       <h1>This is h1 test.</h1>
       This is some body text.
       <h2>This is h2 test.</h2>
   
       <blockquote>This is some blockquote text.
       </blockquote>
       <h3>This is h3 test.</h3>
       <h4>This is h4 test.</h4>
       </body>
       </html>
   
       </blockquote>
       The style.php file:
   
       <blockquote>
       <?php
       header("Content-type: text/css");
       $white = '#fff';
       $dkgray = '#333';
       $dkgreen = '#008400';
       ?>
       body {
        background:<?=$white?>;
        color:<?=$dkgray?>;
       }
       h1, h2, h3, h4 {
        color:<?=$dkgreen?>;
       }
       blockquote {
        color:<?=$dkgreen?>;
       }
       ```
   
 * What am I missing here?
 * Bruce

The topic ‘css variables with style.php’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [variables](https://wordpress.org/support/topic-tag/variables/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Bruce](https://wordpress.org/support/users/bnowthen/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/css-variables-with-stylephp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
