Create HTML from CSS! A modern javascript library you'd expect Facebook to invent.

Overview

HeadwindHTML

Create HTML from CSS! A modern javascript library you'd expect Facebook to invent.

Slowly build modern websites without ever leaving your CSS, with HeadwindHTML

What does it do?

Try it now (Codepen) Headwind HTML let's you write CSS instead of HTML. When the page is loaded, your css will be parsed and converted to HTML.

Normally, you would create a html link like this:

Text">
<a href="http://google.com">Texta>

With Headwind HTML, you can create your link element directly from CSS!!

.css::after{
  --s:a;
  --s-text:"I love Headwind";
  --s-apply-href:"https://google.com";
}

Which will also reduce your HTML to this:

">
<script src="https://cdn.jsdelivr.net/gh/gokhanmeteerturk/HeadwindHTML/headwind.js">script>
<div id="root" class="css">div>

End result:

I love Headwind


Can I also apply Tailwind CSS utility classes?

Yes you can! Here is a simple html link, but with Headwind and Tailwind:

.css::after{
  --s:a;
  --s-text:"I love Headwind with Tailwind";
  --s-apply:px-4 py-3 my-2 mx-3 text-md text-white font-semibold bg-purple-600 rounded-full border
  border-purple-200 hover:text-purple-600 hover:bg-white hover:border-purple-600 focus:outline-none
  focus:ring-2 focus:ring-purple-600 focus:ring-offset-2;
  --s-apply-href:"https://google.com";
}

ss2

How to create an element tree?

You can use --s-child custom property to create child elements. Headwind will automatically create the child elements.

.css::after{
  --s:a;
  --s-text:"I love breaking";
  --s-apply:px-4 py-3 my-2 mx-3 text-md text-white font-semibold bg-purple-600 rounded-full border border-purple-200 hover:text-purple-600 hover:bg-white hover:border-purple-600 focus:outline-none focus:ring-2 focus:ring-purple-600 focus:ring-offset-2;
  --s-apply-href:"https://google.com";
  
    /* Don't let Adam Wathan see this. */
  --s-child:bold-text-element;
}

.bold-text-element::after{
  --s:b;
  --s-text:" established industry standards";
}

image

Does it use virtual DOM?

No.

Does it break your console?

Yes. Headwind HTML is so 2023 that it intentionally overrides console.error function to make your website feel modern and interactive.

Should I use it?

You should never use Headwind HTML in any kind of environment.

You might also like...

It is an app that allows you to create lists of books and authors made in the course of Microverse. This project was develop using JavaScript, HTML and CSS.

AWESOME BOOKS This is an Awesome book store project that add store and diplay books on the UI. Built With HTML,CSS, JavaScript Frameworks Github, Lint

Jul 28, 2022

Create HTML, CSS only with Javascript/Typescript

SwiftUI inspired JS FrameWork BreazeJS GOAL: Rapidly build modern websites without ever leaving your Javascript/Typescript. Output const ContentView:

Sep 14, 2022

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. I followed the JavaScript, CSS, HTML, DRY, KISS and YAGNI Best practices.

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. I followed the JavaScript, CSS, HTML, DRY, KISS and YAGNI Best practices.

To Do list: add & remove In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of th

Nov 20, 2022

A to-do list app is a productivity tool designed to help users to create and maintain lists of tasks that they need to complete and it allows user to edit their tasks even after the task is saved. Built with CSS, HTML, and JAVASCRIPT.

Tumaini Maganiko 📗 Table of Contents 📗 Table of Contents 📖 To Do List PROJECT 🛠 Built With Tech Stack Key Features 🚀 Live Demo 💻 Getting Started

May 9, 2023

Simple Library implemented using HTML, CSS and JavaScript. This is a simple implementation of JavaScript Modules of ES6.

Awesome-books A single page project with the porpuse of storing books' titles and authors. Built With CSS, HTML & Javascript. How to run in your local

Feb 21, 2022

Quickly create an interactive HTML mock-up by auto sourcing lorem ipsum/images generators, with minimal html markup, and no server side code

RoughDraft.js v0.1.5 Quickly mockup / prototype HTML pages with auto-generated content, without additional JavaScript or server side code. section

Dec 21, 2022

This is my to-do list website built with html, css and JavaScript. In this project I used Webpack to bundle JavaScript and ES6 modules to write modular JavaScript.

This is my to-do list website built with html, css and JavaScript. In this project I used Webpack to bundle JavaScript and ES6 modules to write modular JavaScript.

To-Do-List App This is my to-do list website built with html, css and JavaScript. In this project I used Webpack to bundle JavaScript and ES6 modules

Sep 20, 2022

A JavaScript library to create html elements with js easily

A JavaScript library to create html elements with js easily

applecake is a javascript library for making HTML elements with javascript really easy . Why applecake ? Really easy to use It is not heavy It has a s

Jul 21, 2021

A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time.

A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time.

A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time. Dropdown, navigation bu

Nov 25, 2022
Comments
  • Add support for configuration through a .headwindrc

    Add support for configuration through a .headwindrc

    Currently there is no way to manage any configuration from outside the CSS source code. Highly recommend adding support for externally configuring Headwind, along with some plugins for modern bundlers. Simple examples of few hundred lines of config would also be highly appreciated.

    TODO 
    opened by aalekhpatel07 0
  • No JavaScript support

    No JavaScript support

    I really really need the ability to write JavaScript in my css. It's the one thing I've dreamed about for years and it would make my day if this glorious library could allow me to write all my code in CSS.

    opened by ItsJamie9494 3
Owner
Gökhan Mete ERTÜRK
Gökhan Mete ERTÜRK
Elegant jest.expect typings for a more civilized age

typed-jest-expect Elegant jest.expect typings for a more civilized age Why? By default, the expect utility of jest is very broadly typed, which makes

Elie Rotenberg 4 Feb 25, 2022
CLI tool to add @ts-expect-errors to typescript type errors

suppress-ts-errors Cli tool to add comments to suppress typescript type errors. Add @ts-expect-error or @ts-ignore comments to all locations where err

ryo 53 Dec 8, 2022
A javascript based whatsapp bot for downloading and sending media from youtube and facebook in different formats alongwith couple of other features.

Whatsmazan Available Features Downlaod youtube mp4 Video and send Downlaod youtube mp3 audio and send Search something from youtube Downlaod facebook

mazan labeeb 10 Oct 30, 2022
This is built code of Facebook.com - study only

Notes Repo này gồm một số mã được tải từ Facebook, nhằm mục đích nghiên cứu và học tập. Một số trong này đã được mình phân loại, nhưng sẽ không được l

Ladifire 32 Jul 22, 2022
blog with angular made in sass and firebase auth with google, facebook and github also you can copy to clipboard

BlogAngular This project was generated with Angular CLI version 14.1.2. Development server Run ng serve for a dev server. Navigate to http://localhost

John Gualteros 1 Oct 2, 2022
It redirects the website request from facebook to any blog while keeping the meta data for the each link.

Vercel Redirect It redirects the website request from facebook to any blog while keeping the meta data for the each link. This app uses Next.js and th

Vishwa R 8 Dec 4, 2022
Simple modern JavaScript ES6 library that fetches JSON data into an HTML table which displays nicely within a Bootstrap 4 Card.

Simple modern JavaScript ES6 library that fetches JSON data into an HTML table which displays nicely within a Bootstrap 4 Card. Uses simplenotsimpler/modern-table library.

SimpleNotSimpler 6 Feb 17, 2022
this project is an online library application that enables users to keep track of books in their library by adding to and removing books from a list. Built with JavaScript ES6 syntax, HTML, and CSS

Awesome-Book1 The aim of this project is to restructure the Awesome books app code by using ES6 syntax and organising the workspace using modules. The

Afolabi Akorede 7 Jul 17, 2022
Clinton Mbonu 20 Jun 30, 2022
This website utilizes JavaScript, HTML, and CSS to allow the user to create a to-do list that they can add to, remove from, and edit.

todo Description the project. "To-do list" is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to

Emily Robertson 8 Jul 23, 2022