Seenthis
•
 
Identifiants personnels
  • [mot de passe oublié ?]

Learn CSS the easy one

https://css-tip.com

  • ►/img
    • ►/F85FrPdz6B-926.avif
  • ►/center
  • ►/explore
    • ►/alignment
  • ►/3d-parallax-effect
  • ►/avatar-rhombus
  • ►/animate-height-auto
  • ►/fluid-typography
  • ►/horizontal-line-title
  • ►/css-ribbon
  • @b_b
    b_b @b_b PUBLIC DOMAIN 29/06/2026
    1
    @monolecte
    1

    #Corner only #border around an #image
    ▻https://css-tip.com/img/F85FrPdz6B-926.avif

    img {
      --s: 80px; /* corner size */
      padding: 15px; /* the gap */
      border: 8px solid #69D2E7;
      mask:
        conic-gradient(at var(--s) var(--s),#0000 75%,#000 0)
         0 0/calc(100% - var(--s)) calc(100% - var(--s)),
        conic-gradient(#000 0 0) content-box;
    }

    #css

    b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 7/11/2025
    1
    @jeanmarie
    1

    100 Ways to #Center an element Horizontally and Vertically
    ▻https://css-tip.com/center

    Centering in CSS is pretty easy nowadays. We have numerous methods to do it, but how many exactly? I did the count, and I was able to reach 100 different ways!

    ▻https://css-generators.com/center

    That being said, here are my favorite methods for centering a single element horizontally and vertically for each type of layout.

    .container { 
      display: block;
      align-content: center;
      justify-items: center; /* the support is still not good for this one */
    }
    
    .container {
      display: grid;
      place-content: center;
    }
    
    .container {
      display: flex;
      flex-wrap: wrap;
      place-content: center;
    }

    Voir aussi The Fundamentals of CSS Alignment ▻https://css-tip.com/explore/alignment

    #css #align

    b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 23/10/2024
    4
    @kent1
    @monolecte
    @ericw
    @rastapopoulos
    4

    #3D #parallax effect on #hover
    ▻https://css-tip.com/3d-parallax-effect

    Un petit effet « wow ! »

    img {
      --s: 300px; /* the image size */
      
      width: var(--s);
      aspect-ratio: 1;
      box-sizing: border-box;
      padding-inline: calc(var(--s)/10) 0;
      object-fit: cover;
      border-radius: 20px;
      transform: perspective(350px) rotateY(calc(var(--_i,1)*10deg));
      transition: .5s;
    }
    img:hover {
      --_i: -1;
      padding-inline: 0 calc(var(--s)/10);
    }

    #css

    b_b @b_b PUBLIC DOMAIN
    • @touti
      vide @touti 23/10/2024

      https://assets.codepen.io/2017/hyacinth_macaw.png
      https://picsum.photos/id/776/400/500?.jpg

      vide @touti
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 18/10/2024

    #Avatar #hover #effect with a rhombus shape
    ▻https://css-tip.com/avatar-rhombus

    Avatar hover effect with a rhombus shape

    #css

    b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 25/09/2024
    5
    @arno
    @monolecte
    @7h36
    @marcimat
    @spip
    5

    Animate to height/width auto (without hacks)
    ▻https://css-tip.com/animate-height-auto

    Only three lines of code and you have a smooth transition to height: auto

    interpolate-size: allow-keywords; oO

    #css

    b_b @b_b PUBLIC DOMAIN
    • @arno
      ARNO* @arno ART LIBRE 25/09/2024

      Joli. Bizarrement, caniuse lui colle 0,02% de compatibilité, indiquant que ce sera pour une future version de Chrome, alors que chez moi ça fonctionne parfaitement (Chrome Mac).

      ARNO* @arno ART LIBRE
    • @b_b
      b_b @b_b PUBLIC DOMAIN 25/09/2024

      Ça change bien la hauteur du p, mais ça n’applique par transition: 1s; ;)

      b_b @b_b PUBLIC DOMAIN
    • @arno
      ARNO* @arno ART LIBRE 25/09/2024

      Si, justement, avec Chrome sur Mac, on a bien la transition hyper-smooth. (Safari, en revanche, c’est sans transition.)

      Encore un truc casse-gueule : je développe sur Mac des écrans tactiles qui tournent sur des PC. Comme je connais la machine cible, je peux utiliser les dernières CSS qui sortent, mais quand ça fonctionne différemment sur Mac et sur PC, c’est hyper-chiatique.

      ARNO* @arno ART LIBRE
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 25/09/2024

      ▻https://caniuse.com/?search=interpolate-size

      RastaPopoulos @rastapopoulos CC BY-NC
    • @arno
      ARNO* @arno ART LIBRE 26/09/2024
      @b_b

      Donc c’est bien ça, ça devrait fonctionner sur les Chrome à jour depuis une semaine. @b_b : je viens du coup de rallumer le PC et de mettre à jour Windows, et j’ai bien la transition smooth comme tout…

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 26/09/2024
      @seenthis

      Du coup : faudrait l’intégrer à @seenthis pour les messages longs. Comme de toute façon on n’a pas d’animation là-dessus, ajouter ce petit bout de CSS n’introduira aucune perte.

      ARNO* @arno ART LIBRE
    • @b_b
      b_b @b_b PUBLIC DOMAIN 26/09/2024

      Ça ne mangerait pas de pain oui, à ce sujet il faut que je poste un message pour annoncer les changements du côté du développement de #seenthis :)

      b_b @b_b PUBLIC DOMAIN
    • @monolecte
      Monolecte 😷🤬 @monolecte CC BY-NC-SA 26/09/2024
      @seenthis

      Le lien vers les changements de @seenthis : ▻https://seenthis.net/messages/1073344

      Monolecte 😷🤬 @monolecte CC BY-NC-SA
    • @arno
      ARNO* @arno ART LIBRE 26/09/2024

      Je viens de mettre le bout de code dans /squelettes.

      ARNO* @arno ART LIBRE
    • @b_b
      b_b @b_b PUBLIC DOMAIN 26/09/2024
      @arno

      @arno vu mais c’est sur la branche master ▻https://git.spip.net/seenthis/squelettes/-/commit/d85bc0f14de2c6b01bc61a104a1162e94d3c3302 qui est celle compatible avec SPIP 4, celle utilisée en pro est la branche 2.2. Soit on reporte dans cette branche, sinon on peut attendre le passage en SPIP 4 de seenthis.

      b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 24/07/2024
    1
    @monolecte
    1

    #Fluid_typography with discrete #steps
    ▻https://css-tip.com/fluid-typography

    Use the round() function and create a fluid typography with a discrete function instead of a continuous one.

    Define the step and get precise values within a specific range. Very useful if you have some calculation based on the font-size like using the em unit. No more rounding issue!

    /* Instead of  */
    p {
      font-size: clamp(1rem,1rem + 3vw,2.5rem);
    }
    /* use */
    p {
      font-size: clamp(1rem,round(down,1rem + 3vw,2px),2.5rem);
    }

    #css

    b_b @b_b PUBLIC DOMAIN
    • @arno
      ARNO* @arno ART LIBRE 24/07/2024

      Je ne vois pas de quel « rounding issue » ça parle : certes j’ai un écran haute densité qui a tendance à masquer les problèmes de rendu, mais il ne me semble pas qu’on ait des problèmes de rendu parce qu’on essaie d’afficher une fonte à 16.33333px.

      ARNO* @arno ART LIBRE
    • @b_b
      b_b @b_b PUBLIC DOMAIN 24/07/2024

      Very useful if you have some calculation based on the font-size like using the em unit

      b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 11/06/2024
    6
    @arno
    @monolecte
    @7h36
    @cy_altern
    @rastapopoulos
    @gblin
    6

    #CSS #Pattern : Fancy #backgrounds with CSS #gradients
    ▻https://css-pattern.com

    https://css-pattern.com/css-pattern.jpg

    The biggest collection of background Patterns

    Explore 144 CSS-only patterns made with CSS gradients and optimized with CSS variables.

    You can also surprise yourself with a random CSS Pattern! ▻https://random.css-pattern.com

    Toujours par l’auteur de ►https://css-tip.com dont on causait ici ►https://seenthis.net/messages/1001462

    b_b @b_b PUBLIC DOMAIN
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 12/06/2024

      Il faut pas oublier la version animée : ▻https://animated.css-pattern.com

      Ça pourrait servir à faire des fonds d’écran de connexion aussi :)

      On pourrait possiblement aussi imaginer une saisie qui reprendrait tous les types et qui permettrait de les configurer, et ça donnerait une config à utiliser pour un thème ou un écran.

      RastaPopoulos @rastapopoulos CC BY-NC
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 14/05/2024
    5
    @arno
    @monolecte
    @7h36
    @olaf
    @cy_altern
    5

    The Ultimate CSS Shapes Collection
    ▻https://css-shape.com

    https://css-shape.com/css-shapes.jpg

    The Ultimate Collection of CSS-only Shapes

    Pure #CSS #shapes made with a single-element, modern CSS and an optimized code. All the shapes are here, look no further!

    Par l’auteur de ►https://css-tip.com dont on causait ici ►https://seenthis.net/messages/1001462

    b_b @b_b PUBLIC DOMAIN
    • @klaus
      klaus++ @klaus 14/05/2024

      Cool #merci !
      #css #design

      klaus++ @klaus
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 2/05/2023
    5
    @arno
    @gblin
    @monolecte
    @7h36
    @cy_altern
    5

    #CSS Tip: Learn CSS the easy one
    ►https://css-tip.com

    A small website where you can learn a new CSS #trick every day. All the CSS secrets are here (Flexbox, CSS Grid, Gradients, Colors, Animation, Masking, Selectors, etc). It takes one minute to read a tip.

    Quelques trucs sympas comme ▻https://css-tip.com/horizontal-line-title ou ▻https://css-tip.com/css-ribbon

    #title #line #separator

    b_b @b_b PUBLIC DOMAIN
    • @marcimat
      marcimat @marcimat 3/05/2023

      J’en ai une petite moitié qui ne fonctionnent pas sous FF 112 quand même…

      marcimat @marcimat
    • @arno
      ARNO* @arno ART LIBRE 3/05/2023

      Oui, c’est souvent le souci avec ces « tips » CSS : ça prévoit rarement comment ça se dégrade quand ça ne fonctionne pas. Des fois juste ça fonctionne pas, d’autres fois ça peut être plus inquiétant.

      ARNO* @arno ART LIBRE
    • @klaus
      klaus++ @klaus 14/05/2024

      #quick_and_dirty #css

      klaus++ @klaus
    Écrire un commentaire