#conic gradients
Explore tagged Tumblr posts
Text
8 CSS & JavaScript Snippets for Creating Complex Gradients
New Post has been published on https://thedigitalinsider.com/8-css-javascript-snippets-for-creating-complex-gradients/
8 CSS & JavaScript Snippets for Creating Complex Gradients


Gradients are a true staple of web design. Their beauty lies in their versatility. Use them to make a big, bold statement. Or use them as an accent piece to create a mood.
The possibilities have never been greater. Modern CSS and JavaScript allow us to do more than mimic print design. We can use them to add movement and interactivity to the mix. But it goes deeper.
Gradients are no longer limited to container backgrounds. They can also style text content. It’s an opportunity to enhance headlines and calls to action.
So, what kinds of things can you do with gradients? We scanned the archives of CodePen to find eight great examples.
Grainy & Gradients Text Using color-mix by LukyVJ
This snippet uses the recent CSS color-mix property. The property simplifies the process of darkening, lightening, and desaturating colors. The result is a beautiful text gradient that allows the page background to come through. We don’t often associate gradients with graininess. But it works to perfection here.
See the Pen Grainy & Gradients text by LukyVJ
Single Element Gradient Background Patterns by Ana Tudor
Conic gradients add a unique twist to the element. The color transitions rotate around a center point. You can see it on display in this example. Each card sports a unique and intricate pattern.
See the Pen 1 element card background patterns (see description) by Ana Tudor
Animated Radial Gradient Pattern by Loktar
Gradients still make great backgrounds. And this animated presentation demonstrates how far they’ve come. It looks amazing. The relatively few lines of code that powers it are equally impressive.
See the Pen Moving Radial Gradient Pattern by Loktar
Single DIV Radial Gradient Swirl by Adam Argyle
How can a single div element contain so many colors? The magic is in multiple radial gradients. Four gradients start at the edges and meet in the middle. The result is a colorful delight.
See the Pen 4 Corner Radial Gradient Swirl by Adam Argyle
AI Prompt UI with Subtle Gradient by Vincent Durand
Check out the subtle gradient on this artificial intelligence (AI) interface. It cleverly mixes with glassmorphism to produce a unique aesthetic. The effect brings life to the page.
See the Pen Imagica – AI prompt UI by Vincent Durand
Radial Gradient Cursor Trailer by Uzo Awili
Here’s an example of gradients shining a light on a background image. Move your cursor and watch as it casts a bright pink hue. A tiny bit of CSS and JavaScript makes it work.
See the Pen Radial Gradient Cursor Trailer – Using Gradient Positioning by Uzo Awili
Magical CSS Blossoming Flowers at Night Md Usman Ansari
Gradients play a sizeable role in this “magical” snippet. They add dimension and allow the virtual plant life to fade into black. The CSS repeating-linear-gradient function simplifies the effect’s usage.
See the Pen CSS Blossoming Flowers at Magical Night by Md Usman Ansari
Complex Gradient Examples by Drew McConville
Combining multiple gradients into a CSS background can produce compelling results. Scroll through this snippet to see four such examples. You’ll find a mix of colors and gradient types. It may even convince you to do some experimentation.
See the Pen Complex Gradient Examples by Drew McConville
A Fresh Look at a Design Staple
There was a time when designers shied away from gradients. The era of flat design encouraged the use of solid colors. But we rightfully came back to them.
The examples above show that gradients are still a valuable tool. They add flavor to all sorts of design elements. And it seems like designers are constantly finding creative uses.
That speaks to their flexibility. You can tweak gradients in endless ways. Make them as simple or complex as you like.
Want to see even more CSS and JavaScript gradient ideas? Be sure to check out our CodePen collection!
Related Topics
#ai#amazing#amp#artificial#Artificial Intelligence#background#code#Color#colors#conic gradients#container#CSS#CSS Snippets#Design#designers#display#flowers#gradients#how#Ideas#intelligence#interactivity#it#JavaScript#JavaScript Snippets#life#Light#linear-gradient#movement#patterns
1 note
·
View note
Text
Dev Log Feb 14 2025 - Space Dust Shader
Two weeks left until release. And I almost forgot to post the dev blog post on the second Friday. Whoops. Since it's late, I'll be quick. Since I promised some shader stuff last week, I should probably deliver on that. For those unfamiliar, shaders are tiny programs written to be executed on the GPU for handling rendering of graphics for the game. It's a bit hand-wavy, but there's a bunch of different types that you can write for different stages in the rendering pipeline, which itself can be configured differently based on what the game is. Most modern games using OpenGL and similar pipelines have at bare minimum a Vertex Shader, meant to populate the shapes of the things, and a Fragment Shader, meant to draw the colors of the pixels. Usually it's just a texture on a plane for most 2D games, but you can get creative and make some neat stuff. Here's a still image (not a gif, sorry) of the attractor/repulsor objects as seen in the first trailer:
It's kind of a neat effect (not to pat myself on the back too much, but you know). There's little dust particles flying into/away from the little swirly hole in the middle. The best part is that it's not actually particle objects - there's no calculation for those individual dust particles at all. It's just one single texture that looks like this:
The image is a composite of a layer of pure Green and Black on the bottom in a conical gradient, a radial gradient of pure red to transparent from the middle on top of that, and then a circle of pure blue with a slight transparent blue tint inside. The trick is that there's a really simple little shader applied to it (code for those who want to commandeer, feel free to use for anything, but note that this is used in the Phaser WebGL pipline and will not just drag-and-drop into most projects) :
precision mediump float; uniform sampler2D uMainSampler; uniform float uTime; varying vec2 outTexCoord; void main() { vec4 c = texture2D(uMainSampler, outTexCoord); float t = fract(sin(c.g * 12.9898) * 43758.5453); float a = clamp(fract(c.r + uTime * 0.05 + t) * c.r * 2.0 + c.b, 0.0, 1.0); gl_FragColor = vec4(0.6 * a, 0.7*a, 0.8*a, a); }
The gist of it is that it takes the image, uses the amount of Green at a specific pixel to determine which 'column' of dust expanding from the center to the edge belongs there. Then, the 'closeness' of the dust is specified by the Red value of the pixel, and more visibility is granted to specific small range of Red values over a function of time with a little bit of pseudo-randomness to make it look nice. Mask it off with the Blue, and increment over time, and voilla - super cheap space dust particle thingy. Obviously, we use shaders quite heavily for a lot of the things that do weird little cyclical movements, including things like the stage shimmy and the wavy effect for the company logo. However, you'd probably be just as surprised how much isn't shaders, and is instead just standard compositing and masking, like the stage background and UI elements. Some clever design and a strong art direction do a ton more for a game's visuals than just throwing raw computational power at it.
0 notes
Text
I got my hands on something pretty cool when I first started learning magic bullshit.
>It's a photo of a very-pasty, kind of grubby hand, holding a dingy-looking doorknob. The hand is pudgy, with a handful of simple rings, mostly just metal bands, spread across her fingers, the dark-blue coat-sleeve stained with oil. The doorknob itself is an brown, unpolished thing, with a lever design and the kind of bend in the metal that you only really get from hitting it with a hammer.
>The next photo just chalk on a brick wall, the rough approximation of a door, with that handle somehow wedged into the mortar between bricks. The truly uncanny thing about this photo is contrasts, though. Magic doors? A dime a dozen, but the lines are wiggly messes, Bellamy's inability to draw a straight line made worse by the door being cracked open, just a hair. The slapdash execution is even more stark when comparing the outline of the "door" part of a magic door, to the runes drawn along the edge of the door. Even from a distance of a few feet, the arcane symbols are perfectly-straight lines whose bright glow is a testament to their quality.
>On the other side of the door is another plane. Truly a fantastical thing, well beyond Bellamy's scope to have ever made -or made full use of. This pocket dimension appears to truly go on forever, an endless forest of conical spires, so far distant from the much, much much smaller one that Bellamy herself has entered into, all fallen into disrepair like some lost city of long-dead giants. The sky is cast in a dark-green, stormy hue, making a dead plane look downright dreary, even without the perpetually-distant backdrop. Over the edge of the balcony Bellamy's taken the photo from is what looks like white sand, stretching on out to those giant spires.
>But the distance to the ground is false, just like the distance to the spires. Only the building ahead is true. Bellamy herself appears to have claimed this single splinter amid the forest for herself, inheriting by right of plunder the long-scavenged residence of some long-dead sorcerer, or something. Bellamy's little pocket-dimension house has been dealt a number of blows over time, and she's done her best to cover the walls with tarps and bits of plyboard, with one visible section of the spire looking somewhat livable from the outside. A piece of campy, tropical clipart is edited into the corner of the photo, with the words "Home Sweet Home!" written in a sunset-colored gradient.
1 note
·
View note
Text
@import url(https://fonts.bunny.net/css?family=ibm-plex-sans:400,600); #_form_3_font-size:14px;line-height:1.6;font-family:arial, helvetica, sans-serif;margin:0#_form_3_ *outline:0._form_hidedisplay:none;visibility:hidden._form_showdisplay:block;visibility:visible#_form_3_._form-toptop:0#_form_3_._form-bottombottom:0#_form_3_._form-leftleft:0#_form_3_._form-rightright:0#_form_3_ input[type="text"],#_form_3_ input[type="tel"],#_form_3_ input[type="date"],#_form_3_ textareapadding:6px;height:auto;border:#979797 1px solid;border-radius:4px;color:#000000 !important;font-size:14px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box#_form_3_ textarearesize:none#_form_3_ ._submit-webkit-appearance:none;cursor:pointer;font-family:arial, sans-serif;font-size:14px;text-align:center;background:#004CFF !important;border:0 !important;-moz-border-radius:4px !important;-webkit-border-radius:4px !important;border-radius:4px !important;color:#FFFFFF !important;padding:10px !important#_form_3_ ._submit:disabledcursor:not-allowed;opacity:0.4#_form_3_ ._submit.processingposition:relative#_form_3_ ._submit.processing::beforecontent:"";width:1em;height:1em;position:absolute;z-index:1;top:50%;left:50%;border:double 3px transparent;border-radius:50%;background-image:linear-gradient(#004CFF, #004CFF), conic-gradient(#004CFF, #FFFFFF);background-origin:border-box;background-clip:content-box, border-box;animation:1200ms ease 0s infinite normal none running _spin#_form_3_ ._submit.processing::aftercontent:"";position:absolute;top:0;bottom:0;left:0;right:0;background:#004CFF !important;border:0 !important;-moz-border-radius:4px !important;-webkit-border-radius:4px !important;border-radius:4px !important;color:#FFFFFF !important;padding:10px !important@keyframes _spin0%transform:translate(-50%, -50%) rotate(90deg)100%transform:translate(-50%, -50%) rotate(450deg)#_form_3_ ._close-iconcursor:pointer;background-image:url("https://d226aj4ao1t61q.cloudfront.net/esfkyjh1u_forms-close-dark.png");background-repeat:no-repeat;background-size:14.2px 14.2px;position:absolute;display:block;top:11px;right:9px;overflow:hidden;width:16.2px;height:16.2px#_form_3_ ._close-icon:beforeposition:relative#_form_3_ ._form-bodymargin-bottom:30px#_form_3_ ._form-image-leftwidth:150px;float:left#_form_3_ ._form-content-rightmargin-left:164px#_form_3_ ._form-brandingcolor:#fff;font-size:10px;clear:both;text-align:left;margin-top:30px;font-weight:100#_form_3_ ._form-branding ._logodisplay:block;width:130px;height:14px;margin-top:6px;background-image:url("https://d226aj4ao1t61q.cloudfront.net/hh9ujqgv5_aclogo_li.png");background-size:130px auto;background-repeat:no-repeat#_form_3_ .form-sr-onlyposition:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0#_form_3_ ._form-label,#_form_3_ ._form_element ._form-labelfont-weight:bold;margin-bottom:5px;display:block#_form_3_._dark ._form-brandingcolor:#333#_form_3_._dark ._form-branding ._logobackground-image:url("https://d226aj4ao1t61q.cloudfront.net/jftq2c8s_aclogo_dk.png")#_form_3_ ._form_elementposition:relative;margin-bottom:10px;font-size:0;max-width:100%#_form_3_ ._form_element *font-size:14px#_form_3_ ._form_element._clearclear:both;width:100%;float:none#_form_3_ ._form_element._clear:afterclear:left#_form_3_ ._form_element input[type="text"],#_form_3_ ._form_element input[type="date"],#_form_3_ ._form_element select,#_form_3_ ._form_element textarea:not(.g-recaptcha-response)display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-family:inherit#_form_3_ ._field-wrapperposition:relative#_form_3_ ._inline-stylefloat:left#_form_3_ ._inline-style input[type="text"]width:150px#_form_3_ ._inline-style:not(._clear)+._inline-style:not(._clear)margin-left:20px#_form_3_ ._form_element img._form-imagemax-width:100%#_form_3_ ._form_element ._form-fieldsetborder:0;padding:0.01em 0 0 0;margin:0;min-width:0#_form_3_ ._clear-elementclear:left#_form_3_ .
_full_widthwidth:100%#_form_3_ ._form_full_fielddisplay:block;width:100%;margin-bottom:10px#_form_3_ input[type="text"]._has_error,#_form_3_ textarea._has_errorborder:#F37C7B 1px solid#_form_3_ input[type="checkbox"]._has_erroroutline:#F37C7B 1px solid#_form_3_ ._errordisplay:block;position:absolute;font-size:14px;z-index:10000001#_form_3_ ._error._abovepadding-bottom:4px;bottom:39px;right:0#_form_3_ ._error._belowpadding-top:8px;top:100%;right:0#_form_3_ ._error._above ._error-arrowbottom:-4px;right:15px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #FFDDDD#_form_3_ ._error._below ._error-arrowtop:0;right:15px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #FFDDDD#_form_3_ ._error-innerpadding:12px 12px 12px 36px;background-color:#FFDDDD;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM9 3V9H7V3H9ZM9 13V11H7V13H9Z' fill='%23CA0000'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:12px center;font-size:14px;font-family:arial, sans-serif;font-weight:600;line-height:16px;color:#000;text-align:center;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;box-shadow:0px 1px 4px rgba(31, 33, 41, 0.298295)@media only screen and (max-width:319px)#_form_3_ ._error-innerpadding:7px 7px 7px 25px;font-size:12px;line-height:12px;background-position:4px center;max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis#_form_3_ ._error-inner._form_errormargin-bottom:5px;text-align:left#_form_3_ ._button-wrapper ._error-inner._form_errorposition:static#_form_3_ ._error-inner._no_arrowmargin-bottom:10px#_form_3_ ._error-arrowposition:absolute;width:0;height:0#_form_3_ ._error-htmlmargin-bottom:10px.pika-singlez-index:10000001 !important#_form_3_ input[type="text"].datetime_datewidth:69%;display:inline#_form_3_ select.datetime_timewidth:29%;display:inline;height:32px#_form_3_ input[type="date"].datetime_datewidth:69%;display:inline-flex#_form_3_ input[type="time"].datetime_timewidth:29%;display:inline-flex@media (min-width:320px) and (max-width:667px)::-webkit-scrollbardisplay:none#_form_3_margin:0;width:100%;min-width:100%;max-width:100%;box-sizing:border-box#_form_3_ *-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:1em#_form_3_ ._form-contentmargin:0;width:100%#_form_3_ ._form-innerdisplay:block;min-width:100%#_form_3_ ._form-title,#_form_3_ ._inline-stylemargin-top:0;margin-right:0;margin-left:0#_form_3_ ._form-titlefont-size:1.2em#_form_3_ ._form_elementmargin:0 0 20px;padding:0;width:100%#_form_3_ ._form-element,#_form_3_ ._inline-style,#_form_3_ input[type="text"],#_form_3_ label,#_form_3_ p,#_form_3_ textarea:not(.g-recaptcha-response)float:none;display:block;width:100%#_form_3_ ._row._checkbox-radio labeldisplay:inline#_form_3_ ._row,#_form_3_ p,#_form_3_ labelmargin-bottom:0.7em;width:100%#_form_3_ ._row input[type="checkbox"],#_form_3_ ._row input[type="radio"]margin:0 !important;vertical-align:middle !important#_form_3_ ._row input[type="checkbox"]+span labeldisplay:inline#_form_3_ ._row span labelmargin:0 !important;width:initial !important;vertical-align:middle !important#_form_3_ ._form-imagemax-width:100%;height:auto !important#_form_3_ input[type="text"]padding-left:10px;padding-right:10px;font-size:16px;line-height:1.3em;-webkit-appearance:none#_form_3_ input[type="radio"],#_form_3_ input[type="checkbox"]display:inline-block;width:1.3em;height:1.3em;font-size:1em;margin:0 0.3em 0 0;vertical-align:baseline#_form_3_ button[type="submit"]padding:20px;font-size:1.5em#_form_3_ ._inline-stylemargin:20px 0 0 !important#_form_3_ .sms_consent_checkboxoverflow:auto#_form_3_ .sms_consent_checkbox input[type="checkbox"]float:left;margin:5px 10px 10px 0#_form_3_ .
sms_consent_checkbox .sms_consent_messagedisplay:inline;width:95%;float:left;text-align:left;margin-bottom:10px#_form_3_ .sms_consent_checkbox .sms_consent_message.sms_consent_miniwidth:90%#_form_3_position:relative;text-align:left;margin:25px auto 0;padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#FFFFFF !important;border:0px solid #B0B0B0 !important;max-width:500px;-moz-border-radius:0px !important;-webkit-border-radius:0px !important;border-radius:0px !important;color:#000000#_form_3_._inline-form,#_form_3_._inline-form ._form-contentfont-family:"IBM Plex Sans", Helvetica, sans-serif#_form_3_._inline-form ._row span,#_form_3_._inline-form ._row labelfont-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:14px;font-weight:400;line-height:1.6em#_form_3__inlineform input[type="text"],#_form_3__inlineform input[type="date"],#_form_3__inlineform input[type="tel"],#_form_3__inlineform select,#_form_3__inlineform textarea:not(.g-recaptcha-response)font-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:14px;font-weight:400;font-color:#000000;line-height:1.6em#_form_3_._inline-form ._html-code *:not(h1, h2, h3, h4, h5, h6),#_form_3_._inline-form ._form-thank-youfont-family:"IBM Plex Sans", Helvetica, sans-serif#_form_3_._inline-form ._form-label,#_form_3_._inline-form ._form-emailidentifier,#_form_3_._inline-form ._form-checkbox-option-labelfont-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:14px;font-weight:700;line-height:1.6em#_form_3_._inline-form ._submitmargin-top:12px;font-family:"IBM Plex Sans", Helvetica, sans-serif#_form_3_._inline-form ._html-code h1,#_form_3_._inline-form ._html-code h2,#_form_3_._inline-form ._html-code h3,#_form_3_._inline-form ._html-code h4,#_form_3_._inline-form ._html-code h5,#_form_3_._inline-form ._html-code h6,#_form_3_._inline-form ._form-titlefont-size:22px;line-height:normal;font-weight:600;margin-bottom:0#_form_3_._inline-form ._form-brandingfont-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:13px;font-weight:100;font-style:normal;text-decoration:none#_form_3_:before,#_form_3_:aftercontent:" ";display:table#_form_3_:afterclear:both#_form_3_._inline-stylewidth:auto;display:inline-block#_form_3_._inline-style input[type="text"],#_form_3_._inline-style input[type="date"]padding:10px 12px#_form_3_._inline-style button._inline-styleposition:relative;top:27px#_form_3_._inline-style pmargin:0#_form_3_._inline-style ._button-wrapperposition:relative;margin:16px 12.5px 0 20px#_form_3_ ._form-thank-youposition:relative;left:0;right:0;text-align:center;font-size:18px#_form_3_ ._form-pc-confirmation ._submitmargin-top:16px@media (min-width:320px) and (max-width:667px)#_form_3_._inline-form._inline-style ._inline-style._button-wrappermargin-top:20px !important;margin-left:0 !important#_form_3_ .iti.iti--allow-dropdown.iti--separate-dial-codewidth:100%#_form_3_ .iti inputwidth:100%;height:32px;border:#979797 1px solid;border-radius:4px#_form_3_ .iti--separate-dial-code .iti__selected-flagbackground-color:#FFFFFF;border-radius:4px#_form_3_ .iti--separate-dial-code .iti__selected-flag:hoverbackground-color:rgba(0, 0, 0, 0.05)#_form_3_ .iti__country-listborder-radius:4px;margin-top:4px;min-width:460px#_form_3_ .iti__country-list--dropupmargin-bottom:4px#_form_3_ .phone-error-hiddendisplay:none#_form_3_ .phone-errorcolor:#E40E49#_form_3_ .phone-input-errorborder:1px solid #E40E49 !important#_form_3_._inline-form ._form-content ._form-list-subscriptions-field fieldsetmargin:0;margin-bottom:1.1428571429em;border:none;padding:0#_form_3_._inline-form ._form-content ._form-list-subscriptions-field fieldset:last-childmargin-bottom:0#_form_3_._inline-form ._form-content ._form-list-subscriptions-field legendmargin-bottom:1.1428571429em#_form_3_._inline-form ._form-content ._form-list-subscriptions-field labeldisplay:flex;align-items:flex-start;justify-content:flex-start;margin-bottom:0.
8571428571em#_form_3_._inline-form ._form-content ._form-list-subscriptions-field label:last-childmargin-bottom:0#_form_3_._inline-form ._form-content ._form-list-subscriptions-field inputmargin:0;margin-right:8px#_form_3_._inline-form ._form-content ._form-list-subscriptions-field ._form-checkbox-option-labeldisplay:block;font-weight:400;margin-top:-4px#_form_3_._inline-form ._form-content ._form-list-subscriptions-field ._form-checkbox-option-label-with-descriptiondisplay:block;font-weight:700;margin-top:-4px#_form_3_._inline-form ._form-content ._form-list-subscriptions-field ._form-checkbox-option-descriptionmargin:0;font-size:0.8571428571em#_form_3_._inline-form ._form-content ._form-list-subscriptions-field ._form-subscriptions-unsubscribe-all-descriptionline-height:normal;margin-top:-2px Cuenta* Correo electrónico* Número de empleados 45658 26 - 50 51 - 100 101 - 500 501 - 1000 Más de 1000 Ingresos anuales Menos de 100.000 100.000 - 500.000 501.000 - 1M 1M - 5M 6M - 10M Más de 10.000 Industrial/Vertical Contabilidad/Financiero Consultoría/Agencia Bloguero/Autor E-commerce/ventas al por menor Entretenimiento/Eventos Fitness/Nutrición Cuidado sanitario Medios/Publicidad Sin ánimo de lucro Formaciones online/Educación Mercado inmobiliario Software Viajes/Hospitalidad Otro ¿Cuál es tu nivel de ingresos? De 0 a 500 euros De 501 a 1.000 euros Más de 1.000 euros Enviar window.cfields = []; window._show_thank_you = function(id, message, trackcmp_url, email) var form = document.getElementById('_form_' + id + '_'), thank_you = form.querySelector('._form-thank-you'); form.querySelector('._form-content').style.display = 'none'; thank_you.innerHTML = message; thank_you.style.display = 'block'; const vgoAlias = typeof visitorGlobalObjectAlias === 'undefined' ? 'vgo' : visitorGlobalObjectAlias; var visitorObject = window[vgoAlias]; if (email && typeof visitorObject !== 'undefined') visitorObject('setEmail', email); visitorObject('update'); else if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) // Site tracking URL to use after inline form submission. _load_script(trackcmp_url); if (typeof window._form_callback !== 'undefined') window._form_callback(id);
; window._show_unsubscribe = function(id, message, trackcmp_url, email) var form = document.getElementById('_form_' + id + '_'), unsub = form.querySelector('._form-thank-you'); var branding = form.querySelector('._form-branding'); if (branding) branding.style.display = 'none'; form.querySelector('._form-content').style.display = 'none'; unsub.style.display = 'block'; form.insertAdjacentHTML('afterend', message) const vgoAlias = typeof visitorGlobalObjectAlias === 'undefined' ? 'vgo' : visitorGlobalObjectAlias; var visitorObject = window[vgoAlias]; if (email && typeof visitorObject !== 'undefined') visitorObject('setEmail', email); visitorObject('update'); else if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) // Site tracking URL to use after inline form submission. _load_script(trackcmp_url); if (typeof window._form_callback !== 'undefined') window._form_callback(id); ; window._show_error = function(id, message, html) var form = document.getElementById('_form_' + id + '_'), err = document.createElement('div'), button = form.querySelector('button'), old_error = form.querySelector('._form_error'); if (old_error) old_error.parentNode.removeChild(old_error); err.innerHTML = message; err.className = '_error-inner _form_error _no_arrow'; var wrapper = document.createElement('div'); wrapper.className = '_form-inner'; wrapper.appendChild(err); button.parentNode.insertBefore(wrapper, button); var submitButton = form.querySelector('[id^="_form"][id$="_submit"]'); submitButton.disabled = false; submitButton.classList.remove('processing'); if (html) var div = document.createElement('div'); div.className = '_error-html'; div.innerHTML = html; err.appendChild(div); ; window._show_pc_confirmation = function(id, header, detail, show, email) var form = document.getElementById('_form_' + id + '_'), pc_confirmation = form.querySelector('._form-pc-confirmation'); if (pc_confirmation.style.display === 'none') form.querySelector('._form-content').style.display = 'none'; pc_confirmation.innerHTML = "" + header + "" + "" + detail + "" + "Administrar preferencias"; pc_confirmation.style.display = 'block'; var mp = document.querySelector('input[name="mp"]'); mp.value = '0'; else form.querySelector('._form-content').style.display = 'inline'; pc_confirmation.style.display = 'none'; var hideButton = document.getElementById('hideButton'); // Add event listener to the button hideButton.addEventListener('click', function() var submitButton = document.querySelector('#_form_3_submit'); submitButton.disabled = false; submitButton.classList.remove('processing'); var mp = document.querySelector('input[name="mp"]'); mp.value = '1'; const cacheBuster = new URL(window.location.href); cacheBuster.searchParams.set('v', new Date().getTime()); window.location.href = cacheBuster.toString(); ); const vgoAlias = typeof visitorGlobalObjectAlias === 'undefined' ? 'vgo' : visitorGlobalObjectAlias; var visitorObject = window[vgoAlias]; if (email && typeof visitorObject !== 'undefined') visitorObject('setEmail', email); visitorObject('update'); else if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) // Site tracking URL to use after inline form submission. _load_script(trackcmp_url); if (typeof window._form_callback !== 'undefined') window._form_callback(id); ; window._load_script = function(url, callback, isSubmit) var head = document.querySelector('head'), script = document.createElement('script'), r = false; var submitButton = document.querySelector('#_form_3_submit'); script.charset = 'utf-8'; script.src = url; if (callback)
script.onload = script.onreadystatechange = function() this.readyState == 'complete')) r = true; callback(); ; script.onerror = function() if (isSubmit) if (script.src.length > 10000) _show_error("3", "Lo sentimos, ocurrió un error con el envío. Acorta tus respuestas y vuelve a intentarlo."); else _show_error("3", "Lo sentimos, ocurrió un error con el envío. Vuelve a intentarlo."); submitButton.disabled = false; submitButton.classList.remove('processing'); head.appendChild(script); ; (function() if (window.location.search.search("excludeform") !== -1) return false; var getCookie = function(name) var match = document.cookie.match(new RegExp('(^ var setCookie = function(name, value) var now = new Date(); var time = now.getTime(); var expireTime = time + 1000 * 60 * 60 * 24 * 365; now.setTime(expireTime); document.cookie = name + '=' + value + '; expires=' + now + ';path=/; Secure; SameSite=Lax;'; var addEvent = function(element, event, func) if (element.addEventListener) element.addEventListener(event, func); else var oldFunc = element['on' + event]; element['on' + event] = function() oldFunc.apply(this, arguments); func.apply(this, arguments); ; var _removed = false; var form_to_submit = document.getElementById('_form_3_'); var allInputs = form_to_submit.querySelectorAll('input, select, textarea'), tooltips = [], submitted = false; var getUrlParam = function(name) if (name.toLowerCase() !== 'email') false; // email is a special case because a plus is valid in the email address var qString = window.location.search; if (!qString) return false; var parameters = qString.substr(1).split('&'); for (var i = 0; i < parameters.length; i++) var parameter = parameters[i].split('='); if (parameter[0].toLowerCase() === 'email') return parameter[1] === undefined ? true : decodeURIComponent(parameter[1]); return false; ; var acctDateFormat = "%m/%d/%Y"; var getNormalizedDate = function(date, acctFormat) %e).*%m/gi) !== null) return decodedDate.replace(/(\d2).*(\d2).*(\d4)/g, '$3-$2-$1'); else if (Date.parse(decodedDate)) var dateObj = new Date(decodedDate); var year = dateObj.getFullYear(); var month = dateObj.getMonth() + 1; var day = dateObj.getDate(); return `$year-$month < 10 ? `0$month` : month-$day < 10 ? `0$day` : day`; return false; ; var getNormalizedTime = function(time) var hour, minutes; var decodedTime = decodeURIComponent(time); var timeParts = Array.from(decodedTime.matchAll(/(\d1,2):(\d1,2)\W*([AaPp][Mm])?/gm))[0]; if (timeParts[3]) // 12 hour format var isPM = timeParts[3].toLowerCase() === 'pm'; if (isPM) hour = parseInt(timeParts[1]) === 12 ? '12' : `$parseInt(timeParts[1]) + 12`; else hour = parseInt(timeParts[1]) === 12 ? '0' : timeParts[1]; else // 24 hour format hour = timeParts[1]; var normalizedHour = parseInt(hour) < 10 ? `0$parseInt(hour)` : hour; var minutes = timeParts[2]; return `$normalizedHour:$minutes`; ; for (var i = 0; i < allInputs.length; i++) var regexStr = "field\\[(\\d+)\\]"; var results = new RegExp(regexStr).exec(allInputs[i].name); if (results != undefined) allInputs[i].dataset.name = allInputs[i].name.match(/\[time\]$/)
? `$window.cfields[results[1]]_time` : window.cfields[results[1]]; else allInputs[i].dataset.name = allInputs[i].name; var fieldVal = getUrlParam(allInputs[i].dataset.name); if (fieldVal) var remove_tooltips = function() for (var i = 0; i < tooltips.length; i++) tooltips[i].tip.parentNode.removeChild(tooltips[i].tip); tooltips = []; ; var remove_tooltip = function(elem) for (var i = 0; i < tooltips.length; i++) if (tooltips[i].elem === elem) tooltips[i].tip.parentNode.removeChild(tooltips[i].tip); tooltips.splice(i, 1); return; ; var create_tooltip = function(elem, text) var tooltip = document.createElement('div'), arrow = document.createElement('div'), inner = document.createElement('div'), new_tooltip = ; if (elem.type != 'radio' && elem.type != 'checkbox') tooltip.className = '_error'; arrow.className = '_error-arrow'; inner.className = '_error-inner'; inner.innerHTML = text; tooltip.appendChild(arrow); tooltip.appendChild(inner); elem.parentNode.appendChild(tooltip); else tooltip.className = '_error-inner _no_arrow'; tooltip.innerHTML = text; elem.parentNode.insertBefore(tooltip, elem); new_tooltip.no_arrow = true; new_tooltip.tip = tooltip; new_tooltip.elem = elem; tooltips.push(new_tooltip); return new_tooltip; ; var resize_tooltip = function(tooltip) ; var resize_tooltips = function() if (_removed) return; for (var i = 0; i < tooltips.length; i++) if (!tooltips[i].no_arrow) resize_tooltip(tooltips[i]); ; var validate_field = function(elem, remove) ; var needs_validate = function(el) if(el.getAttribute('required') !== null) return true if(el.name === 'email' && el.value !== "") return true if((el.id == 'field[]' ; var validate_form = function(e) var err = form_to_submit.querySelector('._form_error'), no_error = true; if (!submitted) submitted = true; for (var i = 0, len = allInputs.length; i < len; i++) var input = allInputs[i]; if (needs_validate(input)) input.type == 'time') addEvent(input, 'blur', function() this.value = this.value.trim(); validate_field(this, true); ); addEvent(input, 'input', function() validate_field(this, true); ); else if (input.type == 'radio' remove_tooltips(); for (var i = 0, len = allInputs.length; i < len; i++) var elem = allInputs[i]; if (needs_validate(elem)) if (elem.tagName.toLowerCase() !== "select") elem.value = elem.value.trim(); validate_field(elem) ? true : no_error = false; if (!no_error && e) e.preventDefault(); resize_tooltips(); return no_error; ; addEvent(window, 'resize', resize_tooltips); addEvent(window, 'scroll', resize_tooltips); var hidePhoneInputError = function(inputId) var errorMessage = document.getElementById("error-msg-" + inputId); var input = document.getElementById(inputId); errorMessage.classList.remove("phone-error"); errorMessage.classList.add("phone-error-hidden"); input.classList.remove("phone-input-error"); ; var initializePhoneInput = function(input, defaultCountry)
return window.intlTelInput(input, utilsScript: "https://unpkg.com/[email protected]/build/js/utils.js", autoHideDialCode: false, separateDialCode: true, initialCountry: defaultCountry, preferredCountries: [] ); var setPhoneInputEventListeners = function(inputId, input, iti) input.addEventListener('blur', function() var errorMessage = document.getElementById("error-msg-" + inputId); if (input.value.trim()) if (iti.isValidNumber()) iti.setNumber(iti.getNumber()); if (errorMessage.classList.contains("phone-error")) hidePhoneInputError(inputId); else showPhoneInputError(inputId) else if (errorMessage.classList.contains("phone-error")) hidePhoneInputError(inputId); ); input.addEventListener("countrychange", function() iti.setNumber(''); ); input.addEventListener("keydown", function(e) var charCode = (e.which) ? e.which : e.keyCode; if (charCode > 31 && (charCode < 48 ); ; var showPhoneInputError = function(inputId) var errorMessage = document.getElementById("error-msg-" + inputId); var input = document.getElementById(inputId); errorMessage.classList.add("phone-error"); errorMessage.classList.remove("phone-error-hidden"); input.classList.add("phone-input-error"); ; var _form_serialize = function(form); const formSupportsPost = false; var form_submit = function(e) e.preventDefault(); if (validate_form()) // use this trick to get the submit button & disable it using plain javascript var submitButton = e.target.querySelector('#_form_3_submit'); submitButton.disabled = true; submitButton.classList.add('processing'); var serialized = _form_serialize( document.getElementById('_form_3_') ).replace(/%0A/g, '\\n'); var err = form_to_submit.querySelector('._form_error'); err ? err.parentNode.removeChild(err) : false; async function submitForm() var formData = new FormData(); const searchParams = new URLSearchParams(serialized); searchParams.forEach((value, key) => if (key !== 'hideButton') formData.append(key, value); //formData.append(key, value); ); let request = headers: "Accept": "application/json" , body: formData, method: "POST" ; let pageUrlParams = new URLSearchParams(window.location.search); if (pageUrlParams.has('t')) request.headers.Authorization = 'Bearer ' + pageUrlParams.get('t'); const response = await fetch('https://kampa5569.activehosted.com/proc.php?jsonp=true', request); return response.json(); if (formSupportsPost) submitForm().then((data) => eval(data.js); ); else _load_script('https://kampa5569.activehosted.com/proc.php?' + serialized + '&jsonp=true', null, true); return false; ; addEvent(form_to_submit, 'submit', form_submit); )();
0 notes
Text
CSS 4 💻 colors and color properties
New Post has been published on https://tuts.kandz.me/css-4-%f0%9f%92%bb-colors-and-color-properties/
CSS 4 💻 colors and color properties

youtube
everything about colors and color properties in CSS color, background-color, filter, border-color, rgb, hsl, rgba and more Colors in CSS can be specified by predefined names → red, blue, green, yellow, orange, purple, black, white, gray and more by hexadecimal values → #00FF00, by rgb → rgb(0,0,0) and hsl → (0, 100%, 50%) rgb uses red, green, blue values from 0 to 255 hsl uses hue (around the color wheel), saturation(how vibrant is it) ... ...and lightness( how much white or black is in it) you can also use rgba and hsla to specify the opacity, 0 → fully transparent and 1 → fully opaque rgba(255, 0, 0, 0.5) and hsla(22, 55%, 64%, 0.7) color → sets the text color background-color → sets tje background color border-color → sets the border color text-shadow → adds shadow to a text and you can specify the color too box-shadow → adds shadow to an element and you can specify the color too opacity → specifies the element's opacity values can be from 0 to 1 caret-color → is used to set the color of the text input cursor CSS supports gradients backgrounds background-image → adds a background image, but you can also specify a color linear-gradient → defines a linear-falling gradient from left to right, top to bottom etc. radial-gradient → creates a radial gradient like a circle or an ellipse conic-gradient → creates a conical gradient from the centre towards a specific angle you can also have repeating gradients. For that exist the properties... repeating-linear-gradient, repeating-radial-gradient filter → applies graphical effects like blur , contrast and more hue-rotate → rotates the color wheel by a specified angle brightness → changes the brightness contrast → changes the brightness grayscale → convets an image to a grayscale saturate → changes the saturation invert → inverts the colors sepia → converts an image to sepia tones
0 notes
Text
And now the conic gradients are being fucking assholes for no reason. Ok. Gotta bug fix those and THEN the calendar prompt bots should be almost guaranteed to not spit out boring white bgs anymore. They still will when the randomly selected calendar colors are white or close to white tho.
0 notes
Text
After the tight cloisters of the rest of Waterfall, this part of the cavern opens into a massive chamber, dwarfing you and the monster kid by your side. A subterranean lake stretches before you in a gradient of blues and greens and purples. Far beyond it, glowing faintly in the darkness, the city of New Home stretches toward the cavern roof, its smaller buildings clustered around a pale blue castle topped by conical spires and lined in stone parapets like a fairytale castle. Dozens of gems sparkle in the ceiling above like crown jewels, casting a soft light on the underground below. There it is. The end of your journey. It’s still a long way off, but for the first time you truly see, and comprehend, the magnitude of this kingdom. You and the monster kid stand silhouetted against the splendor of the view for a long time, keeping a reverent silence between you. Then, wordlessly, you both turn and continue along the path, the view remaining in your mind’s eye as you disappear into another enclosed tunnel.
#undertale#frisk the goat#waterfall#art#it's on a dry erase board#don't ask how long that took#one dried-out marker resurrected and died again in the span of making this
1 note
·
View note
Text
Enhancing Cell Culture Efficiency: The Evolution of the 24 Well Cell Culture Plate
In the realm of biological research, cell culture is an indispensable tool for studying cellular behavior, disease mechanisms, drug screening, and tissue engineering. Central to this practice is the humble yet pivotal tool known as the 24 well cell culture plate. Over the years, this essential piece of laboratory equipment has undergone significant evolution, adapting to the changing needs and advancing technologies of modern research.
The 24 well cell culture plate, a standardized multi-well plate designed for culturing cells, plays a critical role in facilitating various experiments simultaneously within a single plate. Each plate typically consists of 24 individual wells, each capable of accommodating cell culture media and cells for experimentation. Initially, these plates were simple in design, constructed from polystyrene or similar materials, and featured flat, round wells.
As research demands grew more complex, so did the requirements for cell culture plates. Scientists sought improvements in cell adhesion, surface treatments, and the ability to support various cell types. In response, manufacturers began to innovate, introducing surface modifications to enhance cell attachment, proliferation, and differentiation.
One of the significant advancements in 24 well cell culture plates is the development of treated surfaces that mimic the extracellular matrix (ECM), providing cells with a more natural environment for growth. These surfaces may be coated with substances like collagen, fibronectin, or laminin, which promote cell adhesion and improve overall cell health. Such enhancements have revolutionized cell culture techniques, enabling researchers to mimic in vivo conditions more accurately.
Furthermore, the design of the wells themselves has evolved to better accommodate specific experimental needs. Some plates feature conical well bottoms, which facilitate cell pellet formation and ease of media aspiration. Others incorporate unique geometries or surface coatings tailored for specific cell types, such as neurons or endothelial cells, optimizing conditions for their growth and function.
In addition to surface modifications, advancements in material science have contributed to the evolution of 24 well cell culture plates. Researchers now have access to plates made from specialized polymers that offer advantages such as improved optical clarity, reduced autofluorescence, and enhanced gas permeability. These features are particularly beneficial for live-cell imaging, high-content screening, and long-term culture experiments.
Moreover, the incorporation of innovative features like microfluidic channels and compartmentalized wells has expanded the functionality of 24 well cell culture plates. Microfluidic channels allow for precise control of fluid flow and gradient generation, enabling studies of cell migration, chemotaxis, and drug diffusion. Compartmentalized wells, on the other hand, facilitate co-culture experiments and spatially controlled cell interactions, mimicking complex cellular microenvironments.
As the field of cell culture continues to evolve, so too does the demand for versatility, reproducibility, and scalability in laboratory equipment. Manufacturers of 24 well cell culture plates have responded by introducing modular designs that enable seamless integration with automated liquid handling systems, robotic platforms, and high-throughput screening workflows. These advancements streamline experimental processes, improve data quality, and enhance research productivity.
Furthermore, the advent of advanced imaging techniques and analytical tools has spurred innovation in the design of 24 well cell culture plates. Plates with optically clear bottoms enable high-resolution microscopy and real-time monitoring of cellular dynamics. Integrated sensors and electrodes facilitate electrical impedance measurements, providing insights into cell viability, proliferation, and barrier function.
In the realm of drug discovery and development, 24 well cell culture plates play a crucial role in screening compounds for potential therapeutic effects. High-throughput screening platforms utilizing these plates enable rapid assessment of drug candidates across various cell lines and conditions. By miniaturizing assays and increasing throughput, researchers can accelerate the drug discovery process and identify promising candidates more efficiently.
Beyond traditional biomedical research, 24 well cell culture plates have found applications in diverse fields such as regenerative medicine, tissue engineering, and personalized medicine. In tissue engineering, for instance, these plates serve as scaffolds for growing three-dimensional (3D) tissue constructs, mimicking the architecture and function of native tissues. Such advancements hold promise for applications ranging from organ-on-a-chip models to patient-specific drug screening platforms.
In conclusion, the 24 well cell culture plate has undergone remarkable evolution, driven by the ever-changing needs of the scientific community and advances in technology. From simple polystyrene plates to sophisticated multi-functional platforms, these essential tools have revolutionized cell culture techniques and enabled groundbreaking discoveries in biomedical research. As we look to the future, continued innovation in the design and functionality of 24 well cell culture plates will undoubtedly further enhance their utility and impact across various fields of science and medicine.
0 notes
Text
Rain World Art Month '24 Day 9: Filtration System
FireAlpaca really needs more gradient options besides just linear and radial, I need like a conic gradient that functions like a radial so I don't have to do several layers of gradient and blur them together
#rain world#rw art month#rain world art month#slugcat#rw lizard#rw black lizard#rw survivor#lilac draws
1 note
·
View note
Text
Firefox Release 123.0.1 , For Linux, Windows, & macOS
版本號:123.0.1 官方下載: https://www.mozilla.org/zh-TW/firefox/all 更新項目: 修復 Fixed the Firefox Translation language indicator in the address bar displaying a colored square icon instead of the language code icon. (Bug 1879415) Fixed incorrect rendering of Canvas2D conic gradients colors on Windows. (Bug 1851963) Fixed a regression with the onChange event not firing when clearing the value of a…
View On WordPress
0 notes
Text
Fancy Menu Navigation Using Anchor Positioning
New Post has been published on https://thedigitalinsider.com/fancy-menu-navigation-using-anchor-positioning/
Fancy Menu Navigation Using Anchor Positioning
You have for sure heard about the new CSS Anchor Positioning, right? It’s a feature that allows you to link any element from the page to another one, i.e., the anchor. It’s useful for all the tooltip stuff, but it can also create a lot of other nice effects.
In this article, we will study menu navigation where I rely on anchor positioning to create a nice hover effect on links.
Cool, right? We have a sliding effect where the blue rectangle adjusts to fit perfectly with the text content over a nice transition. If you are new to anchor positioning, this example is perfect for you because it’s simple and allows you to discover the basics of this new feature. We will also study another example so stay until the end!
Note that only Chromium-based browsers fully support anchor positioning at the time I’m writing this. You’ll want to view the demos in a browser like Chrome or Edge until the feature is more widely supported in other browsers.
The initial configuration
Let’s start with the HTML structure which is nothing but a nav element containing an unordered list of links:
<nav> <ul> <li><a href="#">Home</a></li> <li class="active"><a href="#">About</a></li> <li><a href="#">Projects</a></li> <li><a href="#">Blog</a></li> <li><a href="#">Contact</a></li> </ul> </nav>
We will not spend too much time explaining this structure because it can be different if your use case is different. Simply ensure the semantic is relevant to what you are trying to do. As for the CSS part, we will start with some basic styling to create a horizontal menu navigation.
ul padding: 0; margin: 0; list-style: none; display: flex; gap: .5rem; font-size: 2.2rem; ul li a color: #000; text-decoration: none; font-weight: 900; line-height: 1.5; padding-inline: .2em; display: block;
Nothing fancy so far. We remove some default styling and use Flexbox to align the elements horizontally.
Sliding effect
First off, let’s understand how the effect works. At first glance, it looks like we have one rectangle that shrinks to a small height, moves to the hovered element, and then grows to full height. That’s the visual effect, but in reality, more than one element is involved!
Here is the first demo where I am using different colors to better see what is happening.
Each menu item has its own “element” that shrinks or grows. Then we have a common “element” (the one in red) that slides between the different menu items. The first effect is done using a background animation and the second one is where anchor positioning comes into play!
The background animation
We will animate the height of a CSS gradient for this first part:
/* 1 */ ul li background: conic-gradient(lightblue 0 0) bottom/100% 0% no-repeat; transition: .2s; /* 2 */ ul li:is(:hover,.active) background-size: 100% 100%; transition: .2s .2s; /* 3 */ ul:has(li:hover) li.active:not(:hover) background-size: 100% 0%; transition: .2s;
We’ve defined a gradient with a 100% width and 0% height, placed at the bottom. The gradient syntax may look strange, but it’s the shortest one that allows me to have a single-color gradient.
Related: “How to correctly define a one-color gradient”
Then, if the menu item is hovered or has the .active class, we make the height equal to 100%. Note the use of the delay here to make sure the growing happens after the shrinking.
Finally, we need to handle a special case with the .active item. If we hover any item (that is not the active one), then the .active item gets the shirking effect (the gradient height is equal to 0%). That’s the purpose of the third selector in the code.
Our first animation is done! Notice how the growing begins after the shrinking completes because of the delay we defined in the second selector.
The anchor positioning animation
The first animation was quite easy because each item had its own background animation, meaning we didn’t have to care about the text content since the background automatically fills the whole space.
We will use one element for the second animation that slides between all the menu items while adapting its width to fit the text of each item. This is where anchor positioning can help us.
Let’s start with the following code:
ul:before content:""; position: absolute; position-anchor: --li; background: red; transition: .2s; ul li:is(:hover, .active) anchor-name: --li; ul:has(li:hover) li.active:not(:hover) anchor-name: none;
To avoid adding an extra element, I will prefer using a pseudo-element on the ul. It should be absolutely-positioned and we will rely on two properties to activate the anchor positioning.
We define the anchor with the anchor-name property. When a menu item is hovered or has the .active class, it becomes the anchor element. We also have to remove the anchor from the .active item if another item is in a hovered state (hence, the last selector in the code). In other words, only one anchor is defined at a time.
Then we use the position-anchor property to link the pseudo-element to the anchor. Notice how both use the same notation --li. It’s similar to how, for example, we define @keyframes with a specific name and later use it inside an animation property. Keep in mind that you have to use the <dashed-indent> syntax, meaning the name must always start with two dashes (--).
The pseudo-element is correctly placed but nothing is visible because we didn’t define any dimension! Let’s add the following code:
ul:before bottom: anchor(bottom); left: anchor(left); right: anchor(right); height: .2em;
The height property is trivial but the anchor() is a newcomer. Here’s how Juan Diego describes it in the Almanac:
The CSS anchor() function takes an anchor element’s side and resolves to the <length> where it is positioned. It can only be used in inset properties (e.g. top, bottom, bottom, left, right, etc.), normally to place an absolute-positioned element relative to an anchor.
Let’s check the MDN page as well:
The anchor() CSS function can be used within an anchor-positioned element’s inset property values, returning a length value relative to the position of the edges of its associated anchor element.
Usually, we use left: 0 to place an absolute element at the left edge of its containing block (i.e., the nearest ancestor having position: relative). The left: anchor(left) will do the same but instead of the containing block, it will consider the associated anchor element.
That’s all — we are done! Hover the menu items in the below demo and see how the pseudo-element slides between them.
Each time you hover over a menu item it becomes the new anchor for the pseudo-element (the ul:before). This also means that the anchor(...) values will change creating the sliding effect! Let’s not forget the use of the transition which is important otherwise, we will have an abrupt change.
We can also write the code differently like this:
ul:before content:""; position: absolute; inset: auto anchor(right, --li) anchor(bottom, --li) anchor(left, --li); height: .2em; background: red; transition: .2s;
In other words, we can rely on the inset shorthand instead of using physical properties like left, right, and bottom, and instead of defining position-anchor, we can include the anchor’s name inside the anchor() function. We are repeating the same name three times which is probably not optimal here but in some situations, you may want your element to consider multiple anchors, and in such cases, this syntax will make sense.
Combining both effects
Now, we combine both effects and, tada, the illusion is perfect!
Pay attention to the transition values where the delay is important:
ul:before transition: .2s .2s; ul li transition: .2s; ul li:is(:hover,.active) transition: .2s .4s; ul:has(li:hover) li.active:not(:hover) transition: .2s;
We have a sequence of three animations — shrink the height of the gradient, slide the pseudo-element, and grow the height of the gradient — so we need to have delays between them to pull everything together. That’s why for the sliding of the pseudo-element we have a delay equal to the duration of one animation (transition: .2 .2s) and for the growing part the delay is equal to twice the duration (transition: .2s .4s).
Bouncy effect? Why not?!
Let’s try another fancy animation in which the highlight rectangle morphs into a small circle, jumps to the next item, and transforms back into a rectangle again!
I won’t explain too much for this example as it’s your homework to dissect the code! I’ll offer a few hints so you can unpack what’s happening.
Like the previous effect, we have a combination of two animations. For the first one, I will use the pseudo-element of each menu item where I will adjust the dimension and the border-radius to simulate the morphing. For the second animation, I will use the ul pseudo-element to create a small circle that I move between the menu items.
Here is another version of the demo with different coloration and a slower transition to better visualize each animation:
The tricky part is the jumping effect where I am using a strange cubic-bezier() but I have a detailed article where I explain the technique in my CSS-Tricks article “Advanced CSS Animation Using cubic-bezier()”.
Conclusion
I hope you enjoyed this little experimentation using the anchor positioning feature. We only looked at three properties/values but it’s enough to prepare you for this new feature. The anchor-name and position-anchor properties are the mandatory pieces for linking one element (often called a “target” element in this context) to another element (what we call an “anchor” element in this context). From there, you have the anchor() function to control the position.
Related: CSS Anchor Positioning Guide
#:has#:is#:not#000#ADD#almanac#anchor positioning#animation#animations#Article#Articles#attention#background#Blog#Blue#border-radius#browser#change#chrome#chromium#code#Color#colors#content#CSS#CSS Animation#css-tricks#Delay#digitalocean#display
0 notes
Text
CSS Gradient Color generator , gradient generator , background gradient generator
Link: CSS Gradient Color Generator Now!
In the realm of web design, gradients add depth, dimension, and visual interest to websites, creating captivating visual effects and enhancing user experience. EditBoxPro’s CSS Gradient Color Generator offers a user-friendly solution for creating custom CSS gradients that elevate the aesthetics of your web projects. Let’s explore how EditBoxPro’s CSS Gradient Color Generator can empower web designers to unleash their creativity and bring their design visions to life.
Harnessing the Power of CSS Gradients
CSS gradients allow web designers to create smooth transitions between two or more colors, resulting in visually appealing backgrounds, buttons, overlays, and other design elements. Gradients add depth and texture to web interfaces, making them more engaging and immersive for users. With EditBoxPro’s CSS Gradient Color Generator, designers can easily experiment with different gradient styles, angles, and color combinations to achieve the desired visual effect for their websites.
Key Features of EditBoxPro’s CSS Gradient Color Generator
Intuitive Gradient Editor: EditBoxPro’s CSS Gradient Color Generator features an intuitive gradient editor that allows designers to create custom gradients with ease. Whether you prefer linear gradients, radial gradients, or conic gradients, our tool offers a range of options to suit your design needs.
Color Picker and Gradient Stops: Customize your gradients by selecting colors from a comprehensive color picker or entering hex codes manually. EditBoxPro’s Gradient Color Generator also allows you to add multiple gradient stops and adjust their positions and opacity levels for precise control over your gradient design.
Gradient Angle and Direction: Experiment with different gradient angles and directions to achieve the desired visual effect for your web design projects. EditBoxPro’s CSS Gradient Color Generator allows you to specify linear gradient angles, radial gradient shapes, and conic gradient starting points for endless design possibilities.
Preview and Code Export: Visualize your gradient designs in real time with EditBoxPro’s live preview feature. As you make changes to your gradient settings, our tool provides instant feedback, allowing you to see how your gradients will appear on the web. Once you’re satisfied with your design, you can easily export the CSS code and integrate it into your web projects.
Cross-Browser Compatibility: EditBoxPro’s CSS Gradient Color Generator ensures cross-browser compatibility by generating CSS code that works seamlessly across modern web browsers. Whether you’re targeting desktop or mobile users, our tool helps you create gradients that render consistently across different devices and platforms.
Advantages of Using EditBoxPro’s CSS Gradient Color Generator
Enhanced Visual Appeal: Elevate the visual appeal of your websites with stunning CSS gradients created using EditBoxPro’s Gradient Color Generator. Whether you’re designing headers, buttons, backgrounds, or overlays, gradients add depth, dimension, and sophistication to your web interfaces, making them more visually appealing and memorable for users.
Time-Saving Design Solution: Streamline your design process and save time with EditBoxPro’s CSS Gradient Color Generator, which offers a user-friendly interface and intuitive controls for creating custom gradients in minutes. Instead of manually coding gradients from scratch, designers can use our tool to experiment with different gradient styles and color combinations effortlessly.
Versatile Design Applications: Whether you’re designing personal websites, portfolio sites, e-commerce platforms, or corporate landing pages, EditBoxPro’s CSS Gradient Color Generator offers a versatile solution for integrating gradients into your web projects. From subtle color transitions to bold gradient effects, our tool empowers designers to create custom gradients that reflect their brand identity and design aesthetic.
Accessible Design Tool: EditBoxPro’s CSS Gradient Color Generator is accessible to designers of all skill levels, from beginners to experienced professionals. With its user-friendly interface and visual editor, our tool makes it easy for designers to experiment with gradients and create visually stunning web designs without the need for advanced coding knowledge.
Conclusion
Transform your web design projects with EditBoxPro’s CSS Gradient Color Generator. Whether you’re a seasoned web designer or just starting out, our tool provides the functionality, flexibility, and convenience you need to create custom gradients that enhance the visual appeal of your websites. Experience the power of CSS gradients, unleash your creativity, and elevate your web design game with EditBoxPro today!
Create Custom CSS Gradients with EditBoxPro’s CSS Gradient Color Generator Now!
gradient generator, gradient generator javascript, css gradient generator, background gradient generator, javascript gradient background generator, multiple color gradient generator, linear gradient generator, gradient color generator, gradient image generator, ultimate css gradient generator, background color generator, random color gradient generator, gradient, gradient color generator javascript, css gradient tutorial, linear gradient
1 note
·
View note
Text
Unleashing the RuPaul Fierceness: A Glamorous Makeover for Traffic Safety Cones
In the world of road safety, traffic cones are the unsung heroes, quietly directing traffic and ensuring order on our streets. But what if we could inject a bit of glamour, flair, and the unapologetic fierceness of RuPaul into these mundane objects? This article explores the creative journey of transforming ordinary traffic safety cones into fabulous, attention-grabbing icons that not only enhance road safety but do so with a touch of RuPaul's signature style.
1. A Colorful Makeover: Embrace the Rainbow
The first step in this fabulous transformation is to bid farewell to the traditional orange hue and embrace the vibrancy of the rainbow. RuPaul is synonymous with bold, expressive colors, and your traffic safety cones should be no exception. Consider painting each cone in a different color or go for a gradient effect that not only catches the eye but turns the road into a runway of color.
2. Glamorous Accessories: Bedazzle and Bling
To truly capture the essence of RuPaul's fierceness, bedazzle your cones with glamorous accessories. Think rhinestones, glitter, and sequins. Transform these otherwise utilitarian objects into dazzling showstoppers that not only catch the light but also the attention of drivers. After all, safety can be glamorous, darling!
3. Witty and Inspirational Quotes: Slay the Day
RuPaul is known for his inspiring quotes and mantras that encourage self-expression and confidence. Apply the same philosophy to your traffic safety cones. Paint them with witty and empowering phrases that not only grab attention but also promote safe driving. Imagine a cone boldly declaring, "Cones say, 'Slay the Day, Drive the Fierce Way!'" – a message that combines safety with sass.
4. Runway-Ready Shapes: Beyond the Conical Norm
Break away from the conventional conical shape and redefine the silhouette of your traffic safety cones to mirror runway-worthy shapes. Think exaggerated flair, curves, and angles that make a statement. Imagine these cones sashaying down the road with a shape that not only directs traffic but also serves as an artistic expression of creativity and style.
5. Interactive LED Lights: Illuminate the Runway
To bring a dynamic element to your fierce traffic safety cones, introduce interactive LED lights. Create a light show that not only enhances visibility during low-light conditions but turns the road into a runway of illumination. Sync the lights to a playlist of RuPaul's greatest hits for a showstopping effect that turns safety into a visual spectacle.
6. Drag Queen Decals: Add a Touch of Glam
Pay homage to the drag queen aesthetic by adding fabulous drag queen decals to your cones. Picture RuPaul's iconic silhouette or the glamorous faces of drag royalty adorning each cone. It's a touch of glam that transforms these safety essentials into works of art, celebrating the bold and empowering spirit of drag culture.
7. Lip Sync for Your Life: Choreographed Cones
Take inspiration from RuPaul's Drag Race and choreograph your traffic safety cones to "lip sync for their lives." Arrange them in playful formations that mimic dance routines. It's a fun and engaging way to capture attention and inject some entertainment into the serious business of road safety. Picture cones sashaying in formation, encouraging drivers to approach safety with a sense of joy and engagement.
Conclusion: Strutting into Safety with Fierceness
In conclusion, the transformation of traffic safety cones into fierce and fabulous road warriors is not just a whimsical exercise but an imaginative way to rethink the mundane. By infusing the RuPaul flair into these everyday objects, we elevate their presence from functional to fabulous. Remember, safety doesn't have to be dull – let your traffic safety cones sashay, shantay, and slay on the road, reminding everyone that even in the realm of road safety, a touch of fierceness can make all the difference.
0 notes
Text
Background attached conic-gradient buttons 🤙 → https://codepen.io/jh3y/pen/QWZyxdg
1 note
·
View note
Text
@import url(https://fonts.bunny.net/css?family=ibm-plex-sans:400,600); #_form_1_font-size:14px;line-height:1.6;font-family:arial, helvetica, sans-serif;margin:0#_form_1_ *outline:0._form_hidedisplay:none;visibility:hidden._form_showdisplay:block;visibility:visible#_form_1_._form-toptop:0#_form_1_._form-bottombottom:0#_form_1_._form-leftleft:0#_form_1_._form-rightright:0#_form_1_ input[type="text"],#_form_1_ input[type="tel"],#_form_1_ input[type="date"],#_form_1_ textareapadding:6px;height:auto;border:#979797 1px solid;border-radius:4px;color:#000000 !important;font-size:14px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box#_form_1_ textarearesize:none#_form_1_ ._submit-webkit-appearance:none;cursor:pointer;font-family:arial, sans-serif;font-size:14px;text-align:center;background:#004CFF !important;border:0 !important;-moz-border-radius:4px !important;-webkit-border-radius:4px !important;border-radius:4px !important;color:#FFFFFF !important;padding:10px !important#_form_1_ ._submit:disabledcursor:not-allowed;opacity:0.4#_form_1_ ._submit.processingposition:relative#_form_1_ ._submit.processing::beforecontent:"";width:1em;height:1em;position:absolute;z-index:1;top:50%;left:50%;border:double 3px transparent;border-radius:50%;background-image:linear-gradient(#004CFF, #004CFF), conic-gradient(#004CFF, #FFFFFF);background-origin:border-box;background-clip:content-box, border-box;animation:1200ms ease 0s infinite normal none running _spin#_form_1_ ._submit.processing::aftercontent:"";position:absolute;top:0;bottom:0;left:0;right:0;background:#004CFF !important;border:0 !important;-moz-border-radius:4px !important;-webkit-border-radius:4px !important;border-radius:4px !important;color:#FFFFFF !important;padding:10px !important@keyframes _spin0%transform:translate(-50%, -50%) rotate(90deg)100%transform:translate(-50%, -50%) rotate(450deg)#_form_1_ ._close-iconcursor:pointer;background-image:url("https://d226aj4ao1t61q.cloudfront.net/esfkyjh1u_forms-close-dark.png");background-repeat:no-repeat;background-size:14.2px 14.2px;position:absolute;display:block;top:11px;right:9px;overflow:hidden;width:16.2px;height:16.2px#_form_1_ ._close-icon:beforeposition:relative#_form_1_ ._form-bodymargin-bottom:30px#_form_1_ ._form-image-leftwidth:150px;float:left#_form_1_ ._form-content-rightmargin-left:164px#_form_1_ ._form-brandingcolor:#fff;font-size:10px;clear:both;text-align:left;margin-top:30px;font-weight:100#_form_1_ ._form-branding ._logodisplay:block;width:130px;height:14px;margin-top:6px;background-image:url("https://d226aj4ao1t61q.cloudfront.net/hh9ujqgv5_aclogo_li.png");background-size:130px auto;background-repeat:no-repeat#_form_1_ .form-sr-onlyposition:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0#_form_1_ ._form-label,#_form_1_ ._form_element ._form-labelfont-weight:bold;margin-bottom:5px;display:block#_form_1_._dark ._form-brandingcolor:#333#_form_1_._dark ._form-branding ._logobackground-image:url("https://d226aj4ao1t61q.cloudfront.net/jftq2c8s_aclogo_dk.png")#_form_1_ ._form_elementposition:relative;margin-bottom:10px;font-size:0;max-width:100%#_form_1_ ._form_element *font-size:14px#_form_1_ ._form_element._clearclear:both;width:100%;float:none#_form_1_ ._form_element._clear:afterclear:left#_form_1_ ._form_element input[type="text"],#_form_1_ ._form_element input[type="date"],#_form_1_ ._form_element select,#_form_1_ ._form_element textarea:not(.g-recaptcha-response)display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-family:inherit#_form_1_ ._field-wrapperposition:relative#_form_1_ ._inline-stylefloat:left#_form_1_ ._inline-style input[type="text"]width:150px#_form_1_ ._inline-style:not(._clear)+._inline-style:not(._clear)margin-left:20px#_form_1_ ._form_element img._form-imagemax-width:100%#_form_1_ ._form_element ._form-fieldsetborder:0;padding:0.01em 0 0 0;margin:0;min-width:0#_form_1_ ._clear-elementclear:left#_form_1_ .
_full_widthwidth:100%#_form_1_ ._form_full_fielddisplay:block;width:100%;margin-bottom:10px#_form_1_ input[type="text"]._has_error,#_form_1_ textarea._has_errorborder:#F37C7B 1px solid#_form_1_ input[type="checkbox"]._has_erroroutline:#F37C7B 1px solid#_form_1_ ._errordisplay:block;position:absolute;font-size:14px;z-index:10000001#_form_1_ ._error._abovepadding-bottom:4px;bottom:39px;right:0#_form_1_ ._error._belowpadding-top:8px;top:100%;right:0#_form_1_ ._error._above ._error-arrowbottom:-4px;right:15px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #FFDDDD#_form_1_ ._error._below ._error-arrowtop:0;right:15px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #FFDDDD#_form_1_ ._error-innerpadding:12px 12px 12px 36px;background-color:#FFDDDD;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM9 3V9H7V3H9ZM9 13V11H7V13H9Z' fill='%23CA0000'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:12px center;font-size:14px;font-family:arial, sans-serif;font-weight:600;line-height:16px;color:#000;text-align:center;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;box-shadow:0px 1px 4px rgba(31, 33, 41, 0.298295)@media only screen and (max-width:319px)#_form_1_ ._error-innerpadding:7px 7px 7px 25px;font-size:12px;line-height:12px;background-position:4px center;max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis#_form_1_ ._error-inner._form_errormargin-bottom:5px;text-align:left#_form_1_ ._button-wrapper ._error-inner._form_errorposition:static#_form_1_ ._error-inner._no_arrowmargin-bottom:10px#_form_1_ ._error-arrowposition:absolute;width:0;height:0#_form_1_ ._error-htmlmargin-bottom:10px.pika-singlez-index:10000001 !important#_form_1_ input[type="text"].datetime_datewidth:69%;display:inline#_form_1_ select.datetime_timewidth:29%;display:inline;height:32px#_form_1_ input[type="date"].datetime_datewidth:69%;display:inline-flex#_form_1_ input[type="time"].datetime_timewidth:29%;display:inline-flex@media (min-width:320px) and (max-width:667px)::-webkit-scrollbardisplay:none#_form_1_margin:0;width:100%;min-width:100%;max-width:100%;box-sizing:border-box#_form_1_ *-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:1em#_form_1_ ._form-contentmargin:0;width:100%#_form_1_ ._form-innerdisplay:block;min-width:100%#_form_1_ ._form-title,#_form_1_ ._inline-stylemargin-top:0;margin-right:0;margin-left:0#_form_1_ ._form-titlefont-size:1.2em#_form_1_ ._form_elementmargin:0 0 20px;padding:0;width:100%#_form_1_ ._form-element,#_form_1_ ._inline-style,#_form_1_ input[type="text"],#_form_1_ label,#_form_1_ p,#_form_1_ textarea:not(.g-recaptcha-response)float:none;display:block;width:100%#_form_1_ ._row._checkbox-radio labeldisplay:inline#_form_1_ ._row,#_form_1_ p,#_form_1_ labelmargin-bottom:0.7em;width:100%#_form_1_ ._row input[type="checkbox"],#_form_1_ ._row input[type="radio"]margin:0 !important;vertical-align:middle !important#_form_1_ ._row input[type="checkbox"]+span labeldisplay:inline#_form_1_ ._row span labelmargin:0 !important;width:initial !important;vertical-align:middle !important#_form_1_ ._form-imagemax-width:100%;height:auto !important#_form_1_ input[type="text"]padding-left:10px;padding-right:10px;font-size:16px;line-height:1.3em;-webkit-appearance:none#_form_1_ input[type="radio"],#_form_1_ input[type="checkbox"]display:inline-block;width:1.3em;height:1.3em;font-size:1em;margin:0 0.3em 0 0;vertical-align:baseline#_form_1_ button[type="submit"]padding:20px;font-size:1.5em#_form_1_ ._inline-stylemargin:20px 0 0 !important#_form_1_ .sms_consent_checkboxoverflow:auto#_form_1_ .sms_consent_checkbox input[type="checkbox"]float:left;margin:5px 10px 10px 0#_form_1_ .
sms_consent_checkbox .sms_consent_messagedisplay:inline;width:95%;float:left;text-align:left;margin-bottom:10px#_form_1_ .sms_consent_checkbox .sms_consent_message.sms_consent_miniwidth:90%#_form_1_position:relative;text-align:left;margin:25px auto 0;padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#FFFFFF !important;border:0px solid #B0B0B0 !important;max-width:500px;-moz-border-radius:0px !important;-webkit-border-radius:0px !important;border-radius:0px !important;color:#000000#_form_1_._inline-form,#_form_1_._inline-form ._form-contentfont-family:"IBM Plex Sans", Helvetica, sans-serif#_form_1_._inline-form ._row span,#_form_1_._inline-form ._row labelfont-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:14px;font-weight:400;line-height:1.6em#_form_1__inlineform input[type="text"],#_form_1__inlineform input[type="date"],#_form_1__inlineform input[type="tel"],#_form_1__inlineform select,#_form_1__inlineform textarea:not(.g-recaptcha-response)font-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:14px;font-weight:400;font-color:#000000;line-height:1.6em#_form_1_._inline-form ._html-code *:not(h1, h2, h3, h4, h5, h6),#_form_1_._inline-form ._form-thank-youfont-family:"IBM Plex Sans", Helvetica, sans-serif#_form_1_._inline-form ._form-label,#_form_1_._inline-form ._form-emailidentifier,#_form_1_._inline-form ._form-checkbox-option-labelfont-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:14px;font-weight:700;line-height:1.6em#_form_1_._inline-form ._submitmargin-top:12px;font-family:"IBM Plex Sans", Helvetica, sans-serif#_form_1_._inline-form ._html-code h1,#_form_1_._inline-form ._html-code h2,#_form_1_._inline-form ._html-code h3,#_form_1_._inline-form ._html-code h4,#_form_1_._inline-form ._html-code h5,#_form_1_._inline-form ._html-code h6,#_form_1_._inline-form ._form-titlefont-size:22px;line-height:normal;font-weight:600;margin-bottom:0#_form_1_._inline-form ._form-brandingfont-family:"IBM Plex Sans", Helvetica, sans-serif;font-size:13px;font-weight:100;font-style:normal;text-decoration:none#_form_1_:before,#_form_1_:aftercontent:" ";display:table#_form_1_:afterclear:both#_form_1_._inline-stylewidth:auto;display:inline-block#_form_1_._inline-style input[type="text"],#_form_1_._inline-style input[type="date"]padding:10px 12px#_form_1_._inline-style button._inline-styleposition:relative;top:27px#_form_1_._inline-style pmargin:0#_form_1_._inline-style ._button-wrapperposition:relative;margin:16px 12.5px 0 20px#_form_1_ ._form-thank-youposition:relative;left:0;right:0;text-align:center;font-size:18px#_form_1_ ._form-pc-confirmation ._submitmargin-top:16px@media (min-width:320px) and (max-width:667px)#_form_1_._inline-form._inline-style ._inline-style._button-wrappermargin-top:20px !important;margin-left:0 !important#_form_1_ .iti.iti--allow-dropdown.iti--separate-dial-codewidth:100%#_form_1_ .iti inputwidth:100%;height:32px;border:#979797 1px solid;border-radius:4px#_form_1_ .iti--separate-dial-code .iti__selected-flagbackground-color:#FFFFFF;border-radius:4px#_form_1_ .iti--separate-dial-code .iti__selected-flag:hoverbackground-color:rgba(0, 0, 0, 0.05)#_form_1_ .iti__country-listborder-radius:4px;margin-top:4px;min-width:460px#_form_1_ .iti__country-list--dropupmargin-bottom:4px#_form_1_ .phone-error-hiddendisplay:none#_form_1_ .phone-errorcolor:#E40E49#_form_1_ .phone-input-errorborder:1px solid #E40E49 !important#_form_1_._inline-form ._form-content ._form-list-subscriptions-field fieldsetmargin:0;margin-bottom:1.1428571429em;border:none;padding:0#_form_1_._inline-form ._form-content ._form-list-subscriptions-field fieldset:last-childmargin-bottom:0#_form_1_._inline-form ._form-content ._form-list-subscriptions-field legendmargin-bottom:1.1428571429em#_form_1_._inline-form ._form-content ._form-list-subscriptions-field labeldisplay:flex;align-items:flex-start;justify-content:flex-start;margin-bottom:0.
8571428571em#_form_1_._inline-form ._form-content ._form-list-subscriptions-field label:last-childmargin-bottom:0#_form_1_._inline-form ._form-content ._form-list-subscriptions-field inputmargin:0;margin-right:8px#_form_1_._inline-form ._form-content ._form-list-subscriptions-field ._form-checkbox-option-labeldisplay:block;font-weight:400;margin-top:-4px#_form_1_._inline-form ._form-content ._form-list-subscriptions-field ._form-checkbox-option-label-with-descriptiondisplay:block;font-weight:700;margin-top:-4px#_form_1_._inline-form ._form-content ._form-list-subscriptions-field ._form-checkbox-option-descriptionmargin:0;font-size:0.8571428571em#_form_1_._inline-form ._form-content ._form-list-subscriptions-field ._form-subscriptions-unsubscribe-all-descriptionline-height:normal;margin-top:-2px Suscribirse para recibir novedades por correo Añada un mensaje descriptivo en el que se informe al visitante sobre el registro. Nombre completo Correo electrónico* Enviar Marketing por ActiveCampaign window.cfields = []; window._show_thank_you = function(id, message, trackcmp_url, email) var form = document.getElementById('_form_' + id + '_'), thank_you = form.querySelector('._form-thank-you'); form.querySelector('._form-content').style.display = 'none'; thank_you.innerHTML = message; thank_you.style.display = 'block'; const vgoAlias = typeof visitorGlobalObjectAlias === 'undefined' ? 'vgo' : visitorGlobalObjectAlias; var visitorObject = window[vgoAlias]; if (email && typeof visitorObject !== 'undefined') visitorObject('setEmail', email); visitorObject('update'); else if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) // Site tracking URL to use after inline form submission. _load_script(trackcmp_url); if (typeof window._form_callback !== 'undefined') window._form_callback(id); ; window._show_unsubscribe = function(id, message, trackcmp_url, email) var form = document.getElementById('_form_' + id + '_'), unsub = form.querySelector('._form-thank-you'); var branding = form.querySelector('._form-branding'); if (branding) branding.style.display = 'none'; form.querySelector('._form-content').style.display = 'none'; unsub.style.display = 'block'; form.insertAdjacentHTML('afterend', message) const vgoAlias = typeof visitorGlobalObjectAlias === 'undefined' ? 'vgo' : visitorGlobalObjectAlias; var visitorObject = window[vgoAlias]; if (email && typeof visitorObject !== 'undefined') visitorObject('setEmail', email); visitorObject('update'); else if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) // Site tracking URL to use after inline form submission. _load_script(trackcmp_url); if (typeof window._form_callback !== 'undefined') window._form_callback(id); ; window._show_error = function(id, message, html) var form = document.getElementById('_form_' + id + '_'), err = document.createElement('div'), button = form.querySelector('button'), old_error = form.querySelector('._form_error'); if (old_error) old_error.parentNode.removeChild(old_error); err.innerHTML = message; err.className = '_error-inner _form_error _no_arrow'; var wrapper = document.createElement('div'); wrapper.className = '_form-inner'; wrapper.appendChild(err); button.parentNode.insertBefore(wrapper, button); var submitButton = form.querySelector('[id^="_form"][id$="_submit"]'); submitButton.disabled = false; submitButton.classList.remove('processing'); if (html) var div = document.createElement('div');
div.className = '_error-html'; div.innerHTML = html; err.appendChild(div); ; window._show_pc_confirmation = function(id, header, detail, show, email) var form = document.getElementById('_form_' + id + '_'), pc_confirmation = form.querySelector('._form-pc-confirmation'); if (pc_confirmation.style.display === 'none') form.querySelector('._form-content').style.display = 'none'; pc_confirmation.innerHTML = "" + header + "" + "" + detail + "" + "Administrar preferencias"; pc_confirmation.style.display = 'block'; var mp = document.querySelector('input[name="mp"]'); mp.value = '0'; else form.querySelector('._form-content').style.display = 'inline'; pc_confirmation.style.display = 'none'; var hideButton = document.getElementById('hideButton'); // Add event listener to the button hideButton.addEventListener('click', function() var submitButton = document.querySelector('#_form_1_submit'); submitButton.disabled = false; submitButton.classList.remove('processing'); var mp = document.querySelector('input[name="mp"]'); mp.value = '1'; const cacheBuster = new URL(window.location.href); cacheBuster.searchParams.set('v', new Date().getTime()); window.location.href = cacheBuster.toString(); ); const vgoAlias = typeof visitorGlobalObjectAlias === 'undefined' ? 'vgo' : visitorGlobalObjectAlias; var visitorObject = window[vgoAlias]; if (email && typeof visitorObject !== 'undefined') visitorObject('setEmail', email); visitorObject('update'); else if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) // Site tracking URL to use after inline form submission. _load_script(trackcmp_url); if (typeof window._form_callback !== 'undefined') window._form_callback(id); ; window._load_script = function(url, callback, isSubmit) var head = document.querySelector('head'), script = document.createElement('script'), r = false; var submitButton = document.querySelector('#_form_1_submit'); script.charset = 'utf-8'; script.src = url; if (callback) script.onload = script.onreadystatechange = function() this.readyState == 'complete')) r = true; callback(); ; script.onerror = function() if (isSubmit) if (script.src.length > 10000) _show_error("1", "Lo sentimos, ocurrió un error con el envío. Acorta tus respuestas y vuelve a intentarlo."); else _show_error("1", "Lo sentimos, ocurrió un error con el envío. Vuelve a intentarlo."); submitButton.disabled = false; submitButton.classList.remove('processing'); head.appendChild(script); ; (function() if (window.location.search.search("excludeform") !== -1) return false; var getCookie = function(name) ; )' + name + '=([^;]+)')); return match ? match[2] : null; var setCookie = function(name, value) var now = new Date(); var time = now.getTime(); var expireTime = time + 1000 * 60 * 60 * 24 * 365; now.setTime(expireTime); document.cookie = name + '=' + value + '; expires=' + now + ';path=/; Secure; SameSite=Lax;'; var addEvent = function(element, event, func) if (element.addEventListener) element.addEventListener(event, func); else var oldFunc = element['on' + event]; element['on' + event] = function() oldFunc.apply(this, arguments); func.apply(this, arguments); ; var _removed = false; var form_to_submit = document.getElementById('_form_1_'); var allInputs = form_to_submit.querySelectorAll('input, select, textarea'), tooltips = [], submitted = false;
var getUrlParam = function(name) if (name.toLowerCase() !== 'email') false; // email is a special case because a plus is valid in the email address var qString = window.location.search; if (!qString) return false; var parameters = qString.substr(1).split('&'); for (var i = 0; i < parameters.length; i++) var parameter = parameters[i].split('='); if (parameter[0].toLowerCase() === 'email') return parameter[1] === undefined ? true : decodeURIComponent(parameter[1]); return false; ; var acctDateFormat = "%m/%d/%Y"; var getNormalizedDate = function(date, acctFormat) %e).*%m/gi) !== null) return decodedDate.replace(/(\d2).*(\d2).*(\d4)/g, '$3-$2-$1'); else if (Date.parse(decodedDate)) var dateObj = new Date(decodedDate); var year = dateObj.getFullYear(); var month = dateObj.getMonth() + 1; var day = dateObj.getDate(); return `$year-$month < 10 ? `0$month` : month-$day < 10 ? `0$day` : day`; return false; ; var getNormalizedTime = function(time) var hour, minutes; var decodedTime = decodeURIComponent(time); var timeParts = Array.from(decodedTime.matchAll(/(\d1,2):(\d1,2)\W*([AaPp][Mm])?/gm))[0]; if (timeParts[3]) // 12 hour format var isPM = timeParts[3].toLowerCase() === 'pm'; if (isPM) hour = parseInt(timeParts[1]) === 12 ? '12' : `$parseInt(timeParts[1]) + 12`; else hour = parseInt(timeParts[1]) === 12 ? '0' : timeParts[1]; else // 24 hour format hour = timeParts[1]; var normalizedHour = parseInt(hour) < 10 ? `0$parseInt(hour)` : hour; var minutes = timeParts[2]; return `$normalizedHour:$minutes`; ; for (var i = 0; i < allInputs.length; i++) var regexStr = "field\\[(\\d+)\\]"; var results = new RegExp(regexStr).exec(allInputs[i].name); if (results != undefined) allInputs[i].dataset.name = allInputs[i].name.match(/\[time\]$/) ? `$window.cfields[results[1]]_time` : window.cfields[results[1]]; else allInputs[i].dataset.name = allInputs[i].name; var fieldVal = getUrlParam(allInputs[i].dataset.name); if (fieldVal) allInputs[i].type == "checkbox") if (allInputs[i].value == fieldVal) allInputs[i].checked = true; else if (allInputs[i].type == "date") allInputs[i].value = getNormalizedDate(fieldVal, acctDateFormat); else if (allInputs[i].type == "time") allInputs[i].value = getNormalizedTime(fieldVal); else allInputs[i].value = fieldVal; var remove_tooltips = function() for (var i = 0; i < tooltips.length; i++) tooltips[i].tip.parentNode.removeChild(tooltips[i].tip); tooltips = []; ; var remove_tooltip = function(elem) for (var i = 0; i < tooltips.length; i++) if (tooltips[i].elem === elem) tooltips[i].tip.parentNode.removeChild(tooltips[i].tip); tooltips.splice(i, 1); return; ; var create_tooltip = function(elem, text) var tooltip = document.createElement('div'), arrow = document.createElement('div'), inner = document.createElement('div'), new_tooltip = ; if (elem.type != 'radio' && elem.type != 'checkbox') tooltip.className = '_error'; arrow.className = '_error-arrow'; inner.className = '_error-inner'; inner.innerHTML = text; tooltip.appendChild(arrow);
tooltip.appendChild(inner); elem.parentNode.appendChild(tooltip); else tooltip.className = '_error-inner _no_arrow'; tooltip.innerHTML = text; elem.parentNode.insertBefore(tooltip, elem); new_tooltip.no_arrow = true; new_tooltip.tip = tooltip; new_tooltip.elem = elem; tooltips.push(new_tooltip); return new_tooltip; ; var resize_tooltip = function(tooltip) doc.scrollTop) - (doc.clientTop ; var resize_tooltips = function() if (_removed) return; for (var i = 0; i < tooltips.length; i++) if (!tooltips[i].no_arrow) resize_tooltip(tooltips[i]); ; var validate_field = function(elem, remove) elem.id == 'ca[11][v]')) if (elem.className.includes('phone-input-error')) elem.className = elem.className + ' _has_error'; no_error = false; if (no_error && elem.name == 'email') if (!value.match(/^[\+_a-z0-9-'&=]+(\.[\+_a-z0-9-']+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]2,)$/i)) elem.className = elem.className + ' _has_error'; no_error = false; tooltip = create_tooltip(elem, "Introduzca una dirección de correo electrónico válida."); if (no_error && /date_field/.test(elem.className)) if (!value.match(/^\d\d\d\d-\d\d-\d\d$/)) elem.className = elem.className + ' _has_error'; no_error = false; tooltip = create_tooltip(elem, "Introduzca una fecha válida."); tooltip ? resize_tooltip(tooltip) : false; return no_error; ; var needs_validate = function(el) ; var validate_form = function(e) var err = form_to_submit.querySelector('._form_error'), no_error = true; if (!submitted) submitted = true; for (var i = 0, len = allInputs.length; i < len; i++) var input = allInputs[i]; if (needs_validate(input)) input.type == 'time') addEvent(input, 'blur', function() this.value = this.value.trim(); validate_field(this, true); ); addEvent(input, 'input', function() validate_field(this, true); ); else if (input.type == 'radio' remove_tooltips(); for (var i = 0, len = allInputs.length; i < len; i++) var elem = allInputs[i]; if (needs_validate(elem)) if (elem.tagName.toLowerCase() !== "select") elem.value = elem.value.trim(); validate_field(elem) ? true : no_error = false; if (!no_error && e) e.preventDefault(); resize_tooltips(); return no_error; ; addEvent(window, 'resize', resize_tooltips); addEvent(window, 'scroll', resize_tooltips); var hidePhoneInputError = function(inputId) var errorMessage = document.getElementById("error-msg-" + inputId); var input = document.getElementById(inputId); errorMessage.classList.remove("phone-error"); errorMessage.classList.add("phone-error-hidden"); input.classList.remove("phone-input-error"); ; var initializePhoneInput = function(input, defaultCountry) return window.intlTelInput(input, utilsScript: "https://unpkg.com/[email protected]/build/js/utils.js", autoHideDialCode: false, separateDialCode: true, initialCountry: defaultCountry, preferredCountries: [] ); var setPhoneInputEventListeners = function(inputId, input, iti) input.addEventListener('blur', function()
var errorMessage = document.getElementById("error-msg-" + inputId); if (input.value.trim()) if (iti.isValidNumber()) iti.setNumber(iti.getNumber()); if (errorMessage.classList.contains("phone-error")) hidePhoneInputError(inputId); else showPhoneInputError(inputId) else if (errorMessage.classList.contains("phone-error")) hidePhoneInputError(inputId); ); input.addEventListener("countrychange", function() iti.setNumber(''); ); input.addEventListener("keydown", function(e) var charCode = (e.which) ? e.which : e.keyCode; if (charCode > 31 && (charCode < 48 ); ; var showPhoneInputError = function(inputId) var errorMessage = document.getElementById("error-msg-" + inputId); var input = document.getElementById(inputId); errorMessage.classList.add("phone-error"); errorMessage.classList.remove("phone-error-hidden"); input.classList.add("phone-input-error"); ; var _form_serialize = function(form); const formSupportsPost = false; var form_submit = function(e) e.preventDefault(); if (validate_form()) // use this trick to get the submit button & disable it using plain javascript var submitButton = e.target.querySelector('#_form_1_submit'); submitButton.disabled = true; submitButton.classList.add('processing'); var serialized = _form_serialize( document.getElementById('_form_1_') ).replace(/%0A/g, '\\n'); var err = form_to_submit.querySelector('._form_error'); err ? err.parentNode.removeChild(err) : false; async function submitForm() var formData = new FormData(); const searchParams = new URLSearchParams(serialized); searchParams.forEach((value, key) => if (key !== 'hideButton') formData.append(key, value); //formData.append(key, value); ); let request = headers: "Accept": "application/json" , body: formData, method: "POST" ; let pageUrlParams = new URLSearchParams(window.location.search); if (pageUrlParams.has('t')) request.headers.Authorization = 'Bearer ' + pageUrlParams.get('t'); const response = await fetch('https://kampa5569.activehosted.com/proc.php?jsonp=true', request); return response.json(); if (formSupportsPost) submitForm().then((data) => eval(data.js); ); else _load_script('https://kampa5569.activehosted.com/proc.php?' + serialized + '&jsonp=true', null, true); return false; ; addEvent(form_to_submit, 'submit', form_submit); )();
0 notes
Text
How To Create Dynamic Donut Charts With TailwindCSS And React — Smashing Magazine
In this article, Paul Scanlon shares a super lightweight approach to creating a Donut chart using conic-gradient(). There are no additional libraries to install or maintain, and there’s no heavy JavaScript that needs to be downloaded by the browser in order for them to work. Let’s explore! CSS is amazing — I’m regularly surprised at how far it has come in the years I’ve been using it (~2005 –…

View On WordPress
0 notes