Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div><h1>light it up</h1></div>

<p class="credit">Font: <a href="">Tiny by Jack Halten Fahnestock</a></p>


                @font-face {
	src: url('');
	font-family:'TINY 5x3';
	font-style: normal;
	font-weight: 20 300;

h1 {
	--axis: 20;

	color: #fefefe;
	font-family:'TINY 5x3';
	font-weight: var(--axis);	
	text-shadow: -1px -1px 0 rgba(#fff, .4), 1px -1px 0 rgba(#fff, .4), -1px 1px 0 rgba(#fff, .4), 1px 1px 0 rgba(#fff, .4), 0 -2px 8px, 0 0 2px, 0 0 5px #ff7e00, 0 0 15px #ff4444, 0 0 2px #ff7e00, 0 2px 3px #000;

html {
	height: 100%;

body {
	background: linear-gradient(to bottom, rgba(29,25,64,1) 0%,rgba(52,60,101,1) 34%,rgba(56,66,109,1) 39%,rgba(82,74,114,1) 50%,rgba(82,74,114,1) 50%,rgba(89,78,114,1) 57%,rgba(105,81,115,1) 62%,rgba(125,84,109,1) 68%,rgba(146,89,110,1) 72%,rgba(165,94,108,1) 76%,rgba(171,94,108,1) 79%,rgba(170,93,106,1) 79%,rgba(186,100,103,1) 86%,rgba(210,106,87,1) 92%,rgba(231,118,67,1) 100%,rgba(222,113,67,1) 100%,rgba(211,106,68,1) 100%);
	// background: #1d1c41;
	height: 100%;
	cursor: pointer;

div {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;	

h1 {
	display: inline-block;
	text-align: center;
	letter-spacing: 0.6rem;
	line-height: 1;	
	margin: 0;
	font-size: 200px;
	position: relative;
	text-transform: uppercase;

p {
	bottom: 0;
	position: absolute;
	color: white;
	font-size: 16px;
	font-style: italic;
	text-align: center;
	margin-bottom: 20px;
	width: 100%;
	a {color: white;}


                // This only works behind a flag in chrome and will not work inside Codepen's editor, you need to open in debug mode
// More information here:

var text = document.querySelector("h1");
var subtitle = document.querySelector("p");

text.addEventListener("input", function() {
  this.setAttribute("data-text", this.innerText);

const minAxisValue = 300;
const maxAxisValue = 20;

const minEventValue = 0;
const maxEventValue = 1000;"--axis", 20);

if ( 'AmbientLightSensor' in window ) {
  const sensor = new AmbientLightSensor();
  sensor.onreading = () => {
	 fluidAxisVariation(minAxisValue, maxAxisValue, minEventValue, maxEventValue, sensor.illuminance, "--axis", text);
    // console.log('Current light level:', sensor.illuminance);
  sensor.onerror = (event) => {
    console.log(, event.error.message);

// Fluid Axis Variation Event
function fluidAxisVariation(minimumAxisValue, maximumAxisValue, minimumEventValue, maximumEventValue, eventValue, axisCustomPropertyName, element) {

	const minAxisValue = minimumAxisValue;
	const maxAxisValue = maximumAxisValue;
    const minEventValue = minimumEventValue;
	const maxEventValue = maximumEventValue;
	const currentEventValue = eventValue;

	const eventPercent = (currentEventValue - minEventValue) / (maxEventValue - minEventValue);
	const fontAxisScale = eventPercent * (minAxisValue - maxAxisValue) + maxAxisValue;
	const fontAxisScale2 = eventPercent * (minAxisValue - maxAxisValue) + maxAxisValue;

	const newAxisValue = currentEventValue > maxEventValue
	   ? minAxisValue
       : currentEventValue < minEventValue
   			? maxAxisValue
   			: fontAxisScale;, newAxisValue);