Show HN: Cyberpunk web design made easy, really easy
Normally making designs like this on the web is really tedious and a bit challenging. You'd have to do things like add a new element to the dom, rotate it 45deg, position it perfectly, draw just one border and make the background match what's outside the box to cover up the square border underneath the main element. (and that's just one corner of one element)<p>For example: <a href="https://i.imgur.com/yY66cdv.png" rel="nofollow">https://i.imgur.com/yY66cdv.png</a> and <a href="https://i.imgur.com/A2Pyeur.png" rel="nofollow">https://i.imgur.com/A2Pyeur.png</a> on Cyberpunk 2077's website this is roughly how they do it.<p>I set out to fix that with augmented-ui.<p>All you have to do now (after including the CSS file (no js or images, etc)) is this: <button augmented-ui="bl-clip exe">...<p>From there, there's a bunch of options that are <i>just CSS</i>. (and there are several other options, not just a simple corner clip!) You can set the size of the clip, change the border on the element to anything, including images and gradients (which is nearly impossible when done the traditional way). You can give it a background inset a distance from the border, leaving a transparent gap (so it'll work over any background at all) and much more!<p>Here are the docs on the border: <a href="http://augmented-ui.com/docs/#--aug-border-bg" rel="nofollow">http://augmented-ui.com/docs/#--aug-border-bg</a> (click show in codepen if you want to play with it, jsfiddle's post feature is currently down)<p>I made all this possible with the polygon feature of clip-path so full-support reaches over 91% of global web users. Check out the CSS behind it all here if you want to see CSS being used as a programming language: <a href="https://unpkg.com/augmented-ui/augmented.css" rel="nofollow">https://unpkg.com/augmented-ui/augmented.css</a><p>Aaaand this is all free to use in any project! Check it out on NPM, I'd really really love to see what you make with it: <a href="https://www.npmjs.com/package/augmented-ui" rel="nofollow">https://www.npmjs.com/package/augmented-ui</a><p>Happy to answer questions! <3 Get augmented! ;)