Search

Nalezeno "math": 52

JavaScript ~~


JavaScript is loaded with tiny syntax tricks to accomplish useful effects. For example, explore any codebase to see !! being used to convert a value to a boolean value. Have you seen ~~ before? Let’s have a look at what it does! We can employ ~~ to trigger a Math.floor operation with those...

Embrace the Political


The tech industry has long held the belief that technology is apolitical. People are flawed, but the machines? They are neutral. They are pure. This is ridiculous, of course. People make the machines. We write the algorithms that can't recognize dark skin tones. We decide to downplay or ignore...

Multi-Million Dollar HTML


Two stories: Jason Grigsby finds Chipotle's online ordering form makes use of an input-masking technique that chops up a credit card expiration year making it invalid and thus denying the order. If pattern="\d\d" maxlength="2" was used instead (native browser feature), the browser is smart enough...

Using a PostCSS function to automate your responsive workflow


A little while back, you might have bumped into this CSS-Tricks article where I described how a mixin can be used to automate responsive font sizes using RFS. In its latest version, v9, RFS is capable of rescaling any value for value for any CSS property with px or rem units, like margin, padding...

Bounce Element Around Viewport in CSS


Let's say you were gonna bounce an element all around a screen, sorta like an old school screensaver or Pong or something. You'd probably be tracking the X location of the element, increasing or decreasing it in a time loop and — when the element reached the maximum or minimum value —...

Collective #533


Is postMessage slow? * Reduced Motion Auto-Play Video * Repo Lovers * Think in Math. Write in Code. Collective #533 was written by Pedro Botelho and published on Codrops

Animating with Clip-Path


clip-path is one of those CSS properties we generally know is there but might not reach for often for whatever reason. It’s a little intimidating in the sense that it feels like math class because it requires working with geometric shapes, each with different values that draw certain shapes...

Using a Mixin to Take the Math out of Responsive Font Sizes


Responsive Font Size (RFS) is an engine that automatically calculates and updates the font-size property on elements based on the dimensions of the browser viewport. If you’re thinking that sounds familiar, that’s because there is a slew of tools out there that offer various approaches for fluid...

Keep Math in the CSS


There is a sentiment that leaving math calculations in your CSS is a good idea that I agree with. This is for math that you could calculate at authoring time, but specifically chose not to. For instance, if you needed a 7-column float-based grid (don't ask), it's cleaner and more intuitive: .col...

Collective #415


Warrior.js * Math and front-end * Unicode Patterns * Record Label Logos * Make Frontend Shit Again * ScrollHint Collective #415 was written by Pedro Botelho and published on Codrops

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace