mchavirag Posted November 11, 2020 Share Posted November 11, 2020 Site URL: https://www.horaciomarchand.com Hello! I found a code to change the icon of a regular link for the tiktok symbol, now I want to change it to white when the background is dark (purple). Here is the code im using. Thanks in advanced for your help! .icon[aria-label="URL"] svg { visibility:hidden; } .icon[aria-label="URL"] { background-image: url(https://static1.squarespace.com/static/5e39efbd7236283156444451/t/5fab162af50c1a71c9cb7043/1605047850479/tiktok_grandeicon.png); background-size: cover; background-repeat: no-repeat; transform:scale(1); } .sqs-svg-icon--wrapper.url div { visibility: hidden; } .sqs-svg-icon--wrapper.url { background-image: url(https://static1.squarespace.com/static/5e39efbd7236283156444451/t/5fab162af50c1a71c9cb7043/1605047850479/tiktok_grandeicon.png); background-size: cover; background-repeat: no-repeat; } Link to comment
Beyondspace Posted November 11, 2020 Share Posted November 11, 2020 Here is example on a specfic section, footer section[data-section-id="5ea368d4695b01524ef6dd9d"] a[href*='tiktok'].url { filter: brightness(0) invert(1); } BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Guest Posted June 18, 2021 Share Posted June 18, 2021 <a href="https://www.stzgists.com/today-tv-series/">TikTok</a> really took the world by storm all of a sudden they gain popularity overnight and till now <a href="https://www.stzgists.com/loki-tv-series-release-dates/">TikTok</a> is still going strong, all my children are on TikTok they even sleep and wake on this app the owners must be making a shit ton of money. Link to comment
KwameAndCo Posted June 18, 2021 Share Posted June 18, 2021 On 11/11/2020 at 1:16 AM, bangank36 said: Here is example on a specfic section, footer section[data-section-id="5ea368d4695b01524ef6dd9d"] a[href*='tiktok'].url { filter: brightness(0) invert(1); } Assuming you're using 7.1, I would make a slight adjustment to this and use .dark,.dark-bold,.black,.black-bold{ a[href*='tiktok'].url { filter: brightness(0) invert(1); } } This will then automatically apply the colour change so that when used on any dark section on the site, the icon will become white. Rather than needing to use multiple sectionids. Work With Me 🖥️💻📱 Please remember to tag me so that I get a notification and respond to your help requests. If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly. You can also thank me or make requests by buying me a coffee ☕. (Caffeine fuels me to take more requests) For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials) For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩 Some links may be affiliate/referral links. Link to comment
Beyondspace Posted June 18, 2021 Share Posted June 18, 2021 10 hours ago, Kwamzilla said: Assuming you're using 7.1, I would make a slight adjustment to this and use .dark,.dark-bold,.black,.black-bold{ a[href*='tiktok'].url { filter: brightness(0) invert(1); } } This will then automatically apply the colour change so that when used on any dark section on the site, the icon will become white. Rather than needing to use multiple sectionids. That brilliant KwameAndCo 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
KwameAndCo Posted June 21, 2021 Share Posted June 21, 2021 On 6/19/2021 at 12:33 AM, bangank36 said: That brilliant Nah man, you came up with the solution, I was just supporting! Beyondspace 1 Work With Me 🖥️💻📱 Please remember to tag me so that I get a notification and respond to your help requests. If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly. You can also thank me or make requests by buying me a coffee ☕. (Caffeine fuels me to take more requests) For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials) For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩 Some links may be affiliate/referral links. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment