From b6e3452ff9c141e8f70ac27808badccabe5caf1c Mon Sep 17 00:00:00 2001 From: Ibrahim Damilola Dhikirullahi Date: Thu, 6 Jul 2023 13:30:39 -0700 Subject: [PATCH] Placeholder selector added --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 82b28b3..257a912 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ A collection of tips to help take your CSS skills pro. 1. [Use Pointer Events to Control Mouse Events](#use-pointer-events-to-control-mouse-events) 1. [Set `display: none` on Line Breaks Used as Spacing](#set-display-none-on-line-breaks-used-as-spacing) 1. [Use `:empty` to Hide Empty HTML Elements](#use-empty-to-hide-empty-html-elements) +1. [Use `::placeholder` to select placeholder in input Elements](#use-::placeholder-to-select-placeholder-input-elements) ### Use a CSS Reset @@ -366,6 +367,14 @@ Implement CSS-only sliders using `max-height` with overflow hidden: } ``` +### Use `input::placeholder` to beautify input placeholder +``` +input::placeholder { + color: #f0f0f0; + font-weight: italic; +} +``` + The element expands to the `max-height` value on hover and the slider displays as a result of the overflow. [back to table of contents](#table-of-contents)