Disable 1Password on form fields ✦
Quick post to help me remember how to disable 1Password on form fields.
Quick post to help me remember how to disable 1Password on form fields.
Usually I tend to vouch for not messing with the browser’s default inputs, for various reasons. Mainly: they’re still a pain to style in a consistent and accessible way across different browsers. But also, you’re introducing new form controls for your users. Ones that they have never seen in their lives. So make sure that…
Here’s a quick list of social sharing links to use on custom buttons. No need for JavaScript, heavy libraries or giving away your data by using Facebook’s Share button. Just replace each variable (URL, TEXT, etc). Facebook Twitter Reddit Pinterest Linkedin Bonus: Email
When working with Git, you can ignore files and folders by putting those on a .gitignore file on the project’s root. However, if want to ignore files globally, instead of doing so in a per-project basis, you can create a global ignore file. If you’re on a Mac, run: Read more & source https://stackoverflow.com/questions/7335420/global-git-ignore/22885996#22885996
I’ve done this a million times in jQuery, simply by using toggleClass() on a jQuery object. You can achieve the same effect in vanilla JS: Also, there’s a second parameter that forces the toggle to always remove or always add. So you could use that to add some simple logic. Read more DOMTokenList.toggle()
While porting a static site to WordPress I noticed some of my images were a bit blurry. WordPress takes care of resizing JPEGs on upload. Most of the times that’s very handy. However, sometimes you need to bump up the quality a bit. Put this in your theme’s function.php (or in a plugin) to modify…
You can easily reinstall WordPress on an existing site using WP-CLI with this command: It’s important to note the two parameters: [–skip-content]: Download WP without the default themes and plugins.[–force]: Overwrites existing files, if present. We want this in order to overwrite any corrupted or infected files. Read more: wp core download – WP-CLI
A very simple reference for compressing/extracting tar.gz files, which I always forget how to do.
Say you have an <a>, <link> or other HTML element and you need to extract its href (or other) attribute. You can extract those values using DOMDocument quite easily: Link to Repl.it PHP: DOMDocument
As frontend developers or designers, many times we’re requierd to design or implement accordion-style components. While there are plenty of libraries out there, the easiest way to accomplish the same results without adding bloat is to use the details HTML element.