Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the jetpack domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/feedavenue.com/public_html/wp-includes/functions.php on line 6114
CSS :optional - Feedavenue
Saturday, December 21, 2024

CSS :optional

Date:

Related stories

The Best Movie In The Series Yet

With Sonic the Hedgehog 3, the live-action adaptation...

Have a Cozy Weekend. | Cup of Jo

What are you up to this weekend? New...

Motherwell 1-1 Kilmarnock

Watch highlights of the Scottish Premiership match between...

Christmas Dinner Menu Plan | The Recipe Critic

This website may contain affiliate links and advertising...

15 AI Content Creation Tools to Add to Your Tech Stack

We’re not exactly short on AI content creation...
spot_imgspot_img

A decade ago HTML and CSS added the ability to, at least signal, validation of form fields. The required attribute helped inform users which fields were required, while pattern allowed developers to provide a regular expression to match against an <input>‘s value. Targeting required fields and validation values with just CSS and HTML was very useful.

Did you know that CSS provides :optional to allow you to style form elements that aren’t required?

input:optional, select:optional, textarea:optional 
  border: 1px solid #eee;


[required] 
  border: 1px solid red;

In a sense, it feels like :optional represents :not([required]), but :optional is limited to just form fields.

  • Convert XML to JSON with JavaScript
  • Regular Expressions for the Rest of Us

    Sooner or later you’ll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In…

  • Fullscreen API

    As we move toward more true web applications, our JavaScript APIs are doing their best to keep up.  One very simple but useful new JavaScript API is the Fullscreen API.  The Fullscreen API provides a programmatic way to request fullscreen display from the user, and exit…

  • Introducing MooTools LinkAlert

    One of my favorite Firefox plugins is called LinkAlert. LinkAlert shows the user an icon when they hover over a special link, like a link to a Microsoft Word DOC or a PDF file. I love that warning because I hate the surprise…



Source link

Latest stories

spot_img