Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. CSS mobile bug (color gradient text)

CSS mobile bug (color gradient text)

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 30 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kirin
    wrote on last edited by
    #1

    Hi!

    On this page https://t-a-a-a.net/project-5/ in the desktop view, a gradient runs through the entire text as intended. However, in the mobile view (iPhone), the gradient unintentionally repeats for each text paragraph instead of one gradient running across the entire text.

    The strange thing is that it even renders correctly when I load the page on the iPhone in horizontal view — and it stays correct even if I turn the phone afterwards without reloading. It only fails when the page is initially loaded in vertical view on the iPhone.

    Does anyone have an idea what could be causing this? Is it a Laytheme-specific issue or a general CSS bug on mobile devices?

    I would appreciate any help.

    Here is the CSS code:

    :root {
      --shared-gradient: linear-gradient(20deg, #ff00c1, #9600ff, #00b8ff, #00fff9, #f890e7);
    }
    
    @keyframes colorFlow {
      0%   { background-position: 0% 50%; }
      100% { background-position: 100% 50%; }
    }
    
    @keyframes shimmerWaves {
      0%   { transform: scale(1) rotate(0.4deg); opacity: 0.65; }
      50%  { transform: scale(1.05) rotate(-0.4deg); opacity: 0.95; }
      100% { transform: scale(1) rotate(0.4deg); opacity: 0.7; }
    }
    
    @keyframes drift1 {
      0%   { transform: translate(0, 0) scale(1); }
      100% { transform: translate(-10%, 5%) scale(1.05); }
    }
    
    @keyframes drift2 {
      0%   { transform: translate(0, 0) scale(1); }
      100% { transform: translate(8%, -6%) scale(1.08); }
    }
    
    @keyframes grainShift {
      0%, 100% { filter: brightness(1.15) contrast(1.05); }
      50% { filter: brightness(1.2) contrast(1.1); }
    }
    
    @keyframes pulse {
      0%, 100% { transform: scale(1); opacity: 0.8; }
      50% { transform: scale(1.1); opacity: 1; }
    }
    
    .shared-gradient {
      background: var(--shared-gradient);
      background-size: 300% 300%;
      background-position: 0% 50%;
      animation: colorFlow 30s linear infinite alternate;
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
      display: inline-block;
    }
    
    /* --- NEON TEXT --- */
    .neon-text,
    .neon-headline {
      font-family: 'GT-Pressura-Light', sans-serif;
      font-size: 1.2em;
      text-align: justify;
      display: block;
      color: transparent;
    }
    
    .neon-text::first-letter {
      font-family: 'FreyaMedium', serif;
      font-size: 5.0em !important;
      line-height: 0.85;
      float: left;
      margin-right: 0.15em;
      padding-top: 0.05em;
      vertical-align: top;
      background: var(--shared-gradient);
      background-size: 300% 300%;
      background-position: 0% 50%;
      animation: colorFlow 30s linear infinite alternate;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
    }
    
    .neon-text p,
    .neon-text span,
    .neon-text em,
    .neon-text strong {
      background-image: var(--shared-gradient);
      background-size: 300% 300%;
      background-attachment: fixed;
      background-position: 0% 50%;
      animation: colorFlow 30s linear infinite alternate;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
    }
    
    .neon-headline span,
    .neon-headline em,
    .neon-headline strong {
      background-image: var(--shared-gradient);
      background-size: 300% 300%;
      background-attachment: fixed;
      background-position: 0% 50%;
      animation: colorFlow 30s linear infinite alternate;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
      display: inline-block;
    }
    
    .neon-headline {
      font-family: 'FreyaMedium', sans-serif;
      font-size: 2.4em;
      letter-spacing: 0.02em;
      line-height: 0.8;
      text-align: left;
    }
    
    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      Screenshot 2025-04-28 at 08.14.44.png

      when i turn this off it seems to look correct

      in lay theme you can use offsets on elements here:
      Screenshot 2025-04-28 at 08.16.18.png

      to turn them off for mobile, i wrote this css.

      i will change it to transform: none
      instead of transform: translate(0,0)
      with the next update

      until then: Enter this css in "lay options" -> "custom css & html" -> "custom css for mobile version"

      .lay-content.nocustomphonegrid #grid .col:not(.below, .in-view), .lay-content.footer-nocustomphonegrid #footer .col:not(.below, .in-view), .lay-content .cover-region-desktop .col:not(.below, .in-view) {
              transform: none !important;
      }
      
      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kirin
        wrote on last edited by
        #3

        Works indeed! Thank you @arminunruh

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        I also code custom websites or custom Lay features.
        šŸ’æ Email me here: šŸ’æ
        info@laytheme.com

        Before you post:
        1. When using a WordPress Cache plugin, disable it or clear your cache.
        2. Update Lay Theme and all Lay Theme Addons
        3. Disable all Plugins
        4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

        This often solves issues you might run into

        When you post:
        1. Post a link to where the problem is
        2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
        3. If the problem is difficult to explain, post screenshots / link to a video to explain it
        Online Users
        A
        alasdair17
        K
        Kai Schecker
        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
        laytheme.com
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Search