Devenet Devenet

Liens en vrac

Quelques 337 marque-pages glanés pendant ma navigation sur le Web.

47 résultats pour #code×

RSS ATOM

Modifier le style par défaut des boutons radio

https://paulmakeswebsites.com/writing/shadcn-radio-button/

input[type="radio"] {
 /* Disable the browser’s default radio button styles */
 appearance: none;
 margin: 0;

 /* Recreate the circle container */
 border: 1px solid black;
 background: white;
 border-radius: 50%;

 /* Center our dot in the container */
 display: inline-grid;
 place-content: center;

 /* Use a pseudo-element to display our “dot” */
 &::before {
   content: "";
   width: 0.75rem;
   height: 0.75rem;
   border-radius: 50%;
 }

 /* And display it when the radio button is checked */
 &:checked::before {
   background: black;
 }
}

Using border-image to apply and overlay gradient

https://frontendmasters.com/blog/quick-trick-using-border-image-to-apply-and-overlay-gradient/

Il est possible d’utiliser la propriété CSS « border-image » pour facilement ajouter un fond sur une image et faciliter le contraste avec le texte.

.overlay {
 border-image: fill 0 linear-gradient(#0003,#000);
}

E-mails HTML modernes : en finir avec les tables

https://www.teotimepacreau.fr/blog/emails-html-modernes/

« Nous prenons en compte seulement les clients Apple Mail, Gmail et Outlook qui couvre ainsi 90 % des lecteurs de mails dans le monde. Nous utiliserons des règles CSS/HTML supportés à minima part 70 % de tout les clients mails. »

Plus besoin d’utiliser des <table>, les <div> sont bien supportées. Les styles sont préférablement en “inline”, car en cas de transfert le <style> est supprimé.

Defensive CSS

https://ishadeed.com/article/defensive-css/

“Oftentimes, we wish that there was a way to avoid a certain CSS issue or behaviors from happening. You know, content is dynamic, and things can change on a web page, thus increasing the possibility of a CSS issue or a weird behavior.

Defensive CSS is a collection of snippets that can help you in writing CSS that is protected. In other words, you will have fewer issues in the future. If you follow my blog, you might read an article I wrote a while back which is called “The just in case mindset”. This is built upon it, and will be an ongoing list of snippets.”

CSS Tips

https://markodenic.com/css-tips/

• Typing Effect
• Drop shadow
• Smooth scrolling
• Center
• Cursors
• Truncate text
• …