I’m working on a refresh of my personal website, what I’m calling the HD remaster. Well, I wouldn’t call it a “full” redesign. I’m just cleaning things up, and Polypane is coming in clutch. I wrote about how much I enjoy developing with Polypane on my personal blog back in March 2023. In there, I say that I discover new things every time I open the browser up and I’m here to say that is still happening as of August 2024.
Polypane, in case you’re unfamiliar with it, is a web browser specifically created to help developers in all sorts of different ways. The most obvious feature is the multiple panes displaying your project in various viewport sizes:
I’m not about to try to list every feature available in Polypane; I’ll leave that to friend and creator, Kilian Valkhof. Instead, I want to talk about a neat feature that I discovered recently.
Outline tab
Inside Polypane’s sidebar, you will find various tabs that provide different bits of information about your site. For example, if you are wondering how your social media previews will look for your latest blog post, Polypane has you covered in the Meta tab.
The tab I want to focus on though, is the Outline tab. On the surface, it seems rather straightforward, Polypane scans the page and provides you outlines for headings, landmarks, links, images, focus order, and even the full page accessibility tree.
Seeing your page this way helps you spot some pretty obvious mistakes, but Polypane doesn’t stop there. Checking the Show issues option will point out some of the not-so-obvious problems.
In the Landmarks view, there is an option to Show potentials as well, which displays elements that could potentially be page landmarks.
In these outline views, you also can show an overlay on the page and highlight where things are located.
Now, the reason I even stumbled upon these features within the Outline tab is due to a bug I was tracking down, one specifically related to focus order. So, I swapped over to the “Focus order” outline to inspect things further.
That’s when I noticed the option to see an overlay for the focus order.
This provides a literal map of the focus order of your page. I found this to be incredibly useful while troubleshooting the bug, as well as a great way to visualize how someone might navigate your website using a keyboard.
These types of seemingly small, but useful features are abundant throughout Polypane.
Amazing tool
When I reached out to Kilian, mentioning my discovery, his response was “Everything’s there when you need it!”
“An uncontrollable, potential lack of something valuable” is a fundamental definition of risk. The foundation of the insurance industry is based on the idea of risk and its sharing, in which an insurer takes on part of the monetary hazard of an insured celebration in return for a predetermined amount of money referred to as a top class. Underwriters are essential to the insurance sector as they determine the types and conditions of insurance coverage. Their duty is to evaluate the risk in imparting coverage to individuals, businesses, and assets and to make decisions that might be consistent with the risk tolerance of an insurer.
As a result, risk management will become a critical step in the underwriting process, ensuring the commercial enterprise’s enduring profitability and policyholder protection. In this sense, a robust insurance underwriting system is important because it permits underwriters to assess risk successfully and make knowledgeable choices. In this blog, we will highlight the importance of risk management to underwriters and how leveraging cutting-edge underwriting structures complements this important procedure.
Importance of Risk Management in Underwriting
Preserving Monetary Stability
Insurance’s essential purpose is to guard against financial loss, and risk control is vital to preserving the insurer’s economic balance. Underwriters ensure that charges are enough to pay for future claims as well as administrative expenses by precisely determining the risk stage connected with every policy. This meticulous risk management provides a solid foundation for the insurer’s financial stability, reassuring policyholders.
Underwriters can better control this using predictive models from a systematic insurance underwriting system. These systems compute future risk based on past data, outside assets, and real-time inputs. This prevents the insurer from taking on more risk than necessary to maintain long-term sustainability and profitability.
2. Avoiding Unfavorable Selection
People or corporations are much more likely to get insurance when the risk is excessive. In contrast, low-risk individuals might also select not to, which is referred to as detrimental selection. Underwriters play a crucial role in addressing this imbalance, ensuring that claims do not exceed expectations and thereby maintaining the insurer’s profitability. Their efforts instill confidence in the fairness and sustainability of the insurance system.
Underwriters can reduce adverse selection by employing data-driven insights and comprehensive risk profiles provided by risk management. Machine learning programs can be integrated into an insurance underwriting system to identify and predict high-risk policyholders. This allows underwriters to determine suitable premiums or, in extreme cases, cancel coverage.
3. Improving Pricing Based on Risk
Underwriters can use risk-based pricing when they have effective risk management in place. With this technique, insurers can charge higher premiums to consumers with more significant risks while offering more competitive rates to low-risk customers. This pricing strategy enhances the insurer’s capacity to attract low-risk customers and maintain profitability.
A progressive underwriting device makes dynamic insurance pricing based on the individual traits of every policyholder viable. To help underwriters best-tune pricing methods, it integrates many records sources, such as credit scores, medical histories, and driving statistics.
4. Increasing the Efficiency of Underwriting
An effective insurance underwriting system and risk control make the system run more smoothly. Underwriters can handle harsh conditions using automatic risk evaluation structures to perform repetitive duties like records collection, background assessments, and simple danger critiques.
By automating regular chance management responsibilities, underwriters may additionally process more policies in less time without compromising on accuracy. This is crucial because insurers must process packages fast while upholding risk standards in an increasingly competitive marketplace.
The Role of Technology in Risk Management
In the cutting-edge insurance landscape, technology has revolutionized danger management practices in underwriting. An insurance underwriting system with advanced technologies such as artificial intelligence (AI), machine studying (ML), and big data analytics enables underwriters to make better-informed choices.
1. Predictive Analytics together with Risk Analysis
One of the technologies revolutionizing risk management the most is predictive analytics. Historical data must be analyzed to forecast future events. Predictive models in underwriting assist underwriters in adjusting premiums or policy terms by predicting the likelihood of a claim.
Moderninsurance underwriting systems incorporate real-time data from external sources, such as social media, satellite imaging, and economic indicators, into prediction models. This allows underwriters to evaluate risks more precisely, even in ambiguous situations.
2. Fraud Identification
Fraudulent claims may severely damage insurance firms. Identifying and mitigating fraud risk throughout the underwriting process is a crucial aspect of risk management.
A coverage underwriting gadget can use artificial intelligence (AI) algorithms to identify positions that might imply fraud. For example, the gadget can also highlight a risk for additional examination through an underwriter if the prospective policyholder offers conflicting records or has a questionable claims history. This lessens the possibility of underwriting fraud-susceptible guidelines.
3. AI and Automation-Powered Decision Making
Underwriters can better cope with large quantities of statistics and make brief, facts-driven alternatives, while positive aspects of the risk management process are automated using AI and machine learning. With AI algorithms, every coverage will undergo a comprehensive hazard appraisal in seconds, which could evaluate chance factors much more quickly than a human underwriter.
Conclusion
Underwriters need to be adept at risk control because it has an immediate bearing on insurance agencies’ fitness, viability, and expansion. By using sophisticated coverage underwriting systems and effective threat control strategies, underwriters may make well-informed judgments, reduce risks, and guarantee that premiums are reasonably priced.
Adopting generation and facts-pushed insights could be crucial for future success in a quickly converting industry. The better risk control equipment gets, the greater the underwriters can be and the more ready they are to address the challenges of an increasing number of complicated insurance panoramas.
SVGator has gone through a series of updates since our last article, which was published in 2021, when it was already considered to be the most advanced web-based tool for vector animation. The first step toward more versatile software came with the mobile export feature that made it possible to implement the animations in iOS and Android applications.
The animation tool continued its upgrade with a series of new export options: video formats including MP4, AVI, MKV, MOV, and WebM, as well as image formats such as GIF, Animated PNG, WebP, and image sequence. By covering a larger area of users’ needs, the app now enables anyone to create animated stickers, social media, and newsletter animations, video assets, and many more types of visual content on demand.
The goal of becoming a “one tool for all” still lacked the last piece of the puzzle, namely full support for Lottie files. Lottie, just like SVG, is a vector-based format, but it has even better comprehensive multi-platform support, a fact that makes it super popular among developers and design professionals. It is built for use across various platforms, enabling smooth integration into both web and mobile applications. Its file size is minimal, it is infinitely scalable, and developers find it straightforward to implement once they get familiar with the format. Lottie can incorporate raster graphics and also supports interactivity.
SVGator’s latest version has everything you need for your various applications without the need for any third-party apps or plug-ins.
Note: You can test all of SVGator’s functionalities free of charge before committing to the Pro plan. However, you can export up to three watermarked files, with videos and GIFs limited to basic quality.
In this article, we will follow a creation process made of these steps:
Importing an existent Lottie JSON and making some minor adjustments;
Importing new animated assets created with SVGator (using the library);
Creating and animating new elements from scratch;
Exporting the Lottie animation.
Getting Started With SVGator
The sign-up process is simple, fast, and straightforward, and no credit card is required. Sign up either with Google or Facebook or, alternatively, by providing your name, email address, and password. Start a project either with a Lottie animation or a static SVG. If you don’t have an existing file, you can design and animate everything starting from a blank canvas.
Now that you’ve created your account, let’s dive right into the fun part. Here’s a preview of how your animation is going to look by the time you’re done following this guide. Neat, right?
After logging in and clicking on the New Project option, you will be taken to the New Project Panel, where you can choose between starting from a blank project or uploading a file. Let’s start this project with an existing Lottie JSON.
Note: Make sure to hitSaveafter each step to make sure you don’t lose any of your progress while working on this project alongside our guide.
Import An Animated Asset
In this step, you will learn how to use the Library to import new assets to your project. You can easily choose from a variety of ready-made SVGs stored in different categories, load new files from your computer (Lottie, static SVG, and images), or save animations from other SVGator projects and reuse them.
In this case, let’s use an animated message bubble previously created and saved to the Uploads section of the Library.
Navigate to the left sidebar of the app and switch to the Library tab, then click the “+” icon to upload the message bubble asset that you downloaded earlier.
After it is loaded in the uploads section, simply click on it to add it to your project.
All the animated properties of the asset are now present in the timeline, and you can edit them if you want.
Note: Make sure the playhead is at the second “0” before adding the animated asset. When adding an animated asset, it will always start animating from the point where the playhead is placed.
Freely adjust its position and size as you wish.
With the playhead at the second 0, click on the Animate button, then choose Position.
At this point, you should have the first Position keyframe automatically added at the second 0, and you are ready to start animating.
Animate The Message Bubble
Start by dragging the playhead on the timeline at 0.2 seconds:
Then, drag the message bubble up a few pixels. The second keyframe will appear in the timeline, marking the element’s new position, thus creating the 2 milliseconds animation.
Note: You can hit Play at any moment to check how everything looks!
Next, you can use the Scale animator to make the bubble disappear after the dots representing the typing are done animating by scaling it down to 0 for both the X and Y axes:
With the message bubble still selected, drag the playhead at 2.2 seconds, click on Animate, and select Scale (or just press Shift + S on the keyboard) to set the first Scale keyframe, then drag the playhead at 2.5 seconds.
Set the scale properties to 0 for both the X and Y axes (in the right side panel). The bubble won’t be visible anymore at this point.
Note: To maintain the ratio while changing the scale values, make sure you have the Maintain proportions on (the link icon next to the scale inputs).
To add an extra touch of interest to this scaling motion, add an easing function preset:
First, jump back to the first Scale keyframe (you can also double-click the keyframe to jump the playhead right at it).
Open the Easing Panel next to the time indicator and scroll down through the presets list, then select Ease in Back. Due to its bezier going out of the graph, this easing function will create a bounce-back effect for the scale animation.
Note: You can adjust the bezier of a selected easing preset and create a new custom function, which will appear at the top of the list.
Keep in mind that you need at least one keyframe selected if you intend to apply an easing. The easing function will apply from the selected keyframe toward the next keyframe at its right. Of course, you can apply a certain easing for multiple keyframes at once.
To get a smoother transition when the message bubble disappears, add an Opacity animation of one millisecond at the end of the scaling:
Choose Opacity from the animators’ list and set the first keyframe at 2.4 seconds, then drag the playhead at 2.5 seconds to match the ending keyframe from the scale animation above.
From the Appearance panel, drag the Opacity slider all the way to the left, at 0%.
Create An Email Icon
For the concept behind this animation to be complete, let’s create (and later animate) a “new email” notification as a response to the character sending that message.
Once again, SVGator’s asset library comes in handy for this step:
Go to the search bar from the Library and type in “mail,” then click on the mail asset from the results.
Place it somewhere above the laptop. Edit the mail icon to better fit the style of the animation:
Open the email group and select the rectangle from the back.
Change its fill color to a dark purple.
Round up the corners using the Radius slider.
Make the element’s design minimal by deleting these two lines from the lower part of the envelope.
Select the envelope seal flap, which is the Polyline element in the group, above the rectangle.
Add a lighter purple for the fill, set the stroke to 2 px width, and also make it white.
To make the animation even more interesting, create a notification alert in the top-right corner of the envelope:
Use the Ellipse tool (O) from the toolbar on top and draw a circle in the top-right corner of the envelope.
Choose a nice red color for the fill, and set the stroke to white with a 2 px width.
Click on the “T” icon to select the Text tool.
Click on the circle and type “1”.
Set the color to white and click on the “B” icon to make it bold.
Select both the red circle and the number, and group them: right-click, and hit Group.
You can also hit Command or Ctrl + G on your keyboard. Double-click on the newly created group to rename it to “Notification.”
Select both the notification group and email group below and create a new group, which you can name “new email.”
Animate The New Email Group
Let’s animate the new email popping out of the laptop right after the character has finished texting his message:
With the “New email” group selected, click twice on the Move down icon from the header to place the group last. You can also press Command or Ctrl + arrow down on your keyboard.
Drag the group behind the laptop (on the canvas) to hide it entirely, and also scale it down a little.
With the playhead at 3 seconds, add the animators Scale and Position. You can also do that by pressing Shift + S and Shift + P on your keyboard.
Drag the playhead at the second 3.3 on the timeline.
Move the New Email group above the laptop and scale it up a bit.
You can also bend the motion path line to create a curved trajectory for the position animation.
Select the first keyframes at the second 3.
Open the easing panel.
And click on the Ease Out Cubic preset to add it to both keyframes.
Animate The Notification
Let’s animate the notification dot separately. We’ll make it pop in while the email group shows up.
Select the Notification group.
Create a scale-up animation for it with 0 for both the X and Y axes at 3.2 and 1 at 3.5 seconds.
Select the first keyframe and, from the easing panel, choose Ease Out Back. This easing function will ensure the popping effect.
Add Expressiveness To The Character
Make the character smile while looking at the email that just popped out. For this, you need to animate the stroke offset of the mouth:
Select the mouth path. You can use the Node tool to select it directly with one click.
Drag the playhead at 3.5 seconds, which is the moment from where the smile will start.
Select the last keyframe of the Stroke offset animator from the timeline and duplicate it at second 3.5, or you can also use Ctrl or Cmd + D for duplication.
Drag the playhead at second 3.9.
Go to the properties panel and set the Offset to 0. The stroke will now fill the path all the way, creating a stroke offset animation of 4 milliseconds.
Final Edits
You can still make all kinds of adjustments to your animation before exporting it. In this case, let’s change the color of the initial Lottie animation we used to start this project:
Use the Node tool to select all the green paths that form the character’s arms and torso.
Change the color as you desire.
Export Lottie
Once you’re done editing, you can export the animation by clicking on the top right Export button and selecting the Lottie format. Alternatively, you can press Command or Ctrl + E on your keyboard to jump directly to the export panel, from where you can still select the animation you want to export.
Make sure the Lottie format is selected from the dropdown. In the export panel, you can set a name for the file you are about to export, choose the frame rate and animation speed, or set a background color.
You can preview the Lottie animation with a Lottie player. Note: This step is recommended to make sure all animations are supported in the Lottie format by previewing it on a webpage using the Lottie player. The preview in the export panel isn’t an actual Lottie animation.
Get back to the export panel and simply click Export to download the Lottie JSON.
Final Thoughts
Now that you’re done with your animation don’t forget that you have plenty of export options available besides Lottie. You can post the same project on social media in video format, export it as an SVG animation for the web, or turn it into a GIF sticker or any other type of visual you can think of. GIF animations can also be used in Figma presentations and prototypes as a high-fidelity preview of the production-ready Lottie file.
We hope you enjoyed this article and that it will inspire you to create amazing Lottie animations in your next project.
Below, you can find a few useful resources to continue your journey with SVG and SVGator:
SVGator tutorials Check out a series of short video tutorials to help you get started with SVGator.
SVGator Help Center It answers the most common questions about SVGator, its features, and membership plans.
Only Chris, right? You’ll want to view this in a Chromium browser:
CodePen Embed Fallback
This is exactly the sort of thing I love, not for its practicality (cuz it ain’t), but for how it illustrates a concept. Generally, tutorials and demos try to follow the “rules” — whatever those may be — yet breaking them helps you understand how a certain thing works. This is one of those.
The concept is pretty straightforward: one target element can be attached to multiple anchors on the page.
Wait, wait! I didn’t attach the .target to the anchors. That’s because we have two ways to do it. One is using the position-anchor property.
.target {
position-anchor: --anchor-1;
}
That establishes a target-anchor relationship between the two elements. But it only accepts a single anchor value. Hmm. We need more than that. That’s what the anchor() function can do. Well, it doesn’t take multiple values, but we can declare it multiple times on different inset properties, each referencing a different anchor.
.target {
top: anchor(--anchor-1, bottom);
}
The second piece of anchor()‘s function is the anchor edge we’re positioned to and it’s gotta be some sort of physical or logical inset — top, bottom, start, end, inside, outside, etc. — or percentage. We’re bascially saying, “Take that .target and slap it’s top edge against --anchor-1‘s bottom edge.
Notice how both anchors are declared on different properties by way of anchor(). That’s rad. But we aren’t actually anchored yet because the .target is just like any other element that participates in the normal document flow. We have to yank it out with absolute positioning for the inset properties to take hold.
In his demo, Chris cleverly attaches the .target to two elements. What makes it clever is that allows you to click and drag it to change its dimensions. The two of them are absolutely positioned, one pinned to the viewport’s top-left edge and one pinned to the bottom-right.
If we attach the .target's top and left edges to --anchor-1‘s bottom and right edges, then attach the target's bottom and right edges to --anchor-2‘s top and left edges, we’re effectively anchored to the two elements. This is what allows the .target element to stretch with the elements when they are resized.
But there’s a small catch: a is resized from its bottom-right corner. The second is positioned in a way where the resizer isn’t directly attached to the .target. If we rotate(180deg), though, it’s all good.
CodePen Embed Fallback
Again, you’ll want to view that in a Chromium browser at the time I’m writing this. Here’s a clip instead if you prefer.
That’s just a background-color on the .target element. We can put a little character in there instead as a background-image like Chris did to polish this off.
CodePen Embed Fallback
Fun, right?! It still blows my mind this is all happening in CSS. It wasn’t many days ago that something like this would’ve been a job for JavaScript.
I’m a big Lynn Fisher fan. You probably are, too, if you’re reading this. Or maybe you’re reading her name for the first time, in which case you’re in for a treat.
That’s because I had a chance to sit down with Lynn for a whopping hour to do nothing more than gab, gab, and gab some more. I love these little Smashing Hours because they’re informal like that and I feel like I really get to know the person I’m talking with. And this was my very first time talking with Lynn, we had a ton to talk about — her CSS art, her annual site refreshes, where she finds inspiration for her work, when the web started to “click” for her… and so much more.
Don’t miss the bit where Lynn discusses her current site design (~24 min.) because it’s a masterclass in animation and creativity.
The text-box-trim and text-box-edge properties in CSS enable developers to trim specifiable amounts of the whitespace that appear above the first formatted line of text and below the last formatted line of text in a text box, making the text box vertically larger than the content within.
This whitespace is called leading, and it appears above and below (so it’s two half-leadings, actually) all lines of text to make the text more readable. However, we only want it to appear in between lines of text, right? We don’t want it to appear along the over or under edges of our text boxes, because then it interferes with our margins, paddings, gaps, and other spacings.
As an example, if we implement a 50px margin but then the leading adds another 37px, we’d end up with a grand total of 87px of space. Then we’d need to adjust the margin to 13px in order to make the space 50px in practice.
As a design systems person, I try to maintain as much consistency as possible and use very little markup whenever possible, which enables me to use the adjacent-sibling combinator (+) to create blanket rules like this:
/* Whenever <element> is followed by <h1> */
<element> + h1 {
margin-bottom: 13px; /* instead of margin-bottom: 50px; */
}
This approach is still a headache since you still have to do the math (albeit less of it). But with the text-box-trim and text-box-edge properties, 50px as defined by CSS will mean 50px visually:
Disclaimer:text-box-trim and text-box-edge are only accessible via a feature flag in Chrome 128+ and Safari 16.4+, as well as Safari Technology Preview without a feature flag. See Caniuse for the latest browser support.
Start with text-box-trim
text-box-trim is the CSS property that basically activates text box trimming. It doesn’t really have a use beyond that, but it does provide us with the option to trim from just the start, just the end, both the start and end, or none:
Note: In older web browsers, you might need to use the older start/end/both values in place of the newer trim-start/trim-end/trim-both values, respectively. In even older web browsers, you might need to use top/bottom/both. There’s no reference for this, unfortunately, so you’ll just have to see what works.
Now, where do you want to trim from?
You’re probably wondering what I mean by that. Well, consider that a typographic letter has multiple peaks.
There’s the x-height, which marks the top of the letter “x” and other lowercase characters (not including ascenders or overshoots), the cap height, which marks the top of uppercase characters (again, not including ascenders or overshoots), and the alphabetic baseline, which marks the bottom of most letters (not including descenders or overshoots). Then of course there’s the ascender height and descender height too.
You can trim the whitespace between the x-height, cap height, or ascender height and the “over” edge of the text box (this is where overlines begin), and also the white space between the alphabetic baseline or descender height and the “under” edge (where underlines begin if text-underline-position is set to under).
Don’t trim anything
text-box-edge: leading means to include all of the leading; simply don’t trim anything. This has the same effect as text-box-trim: none or forgoing text-box-trim and text-box-edge entirely. You could also restrict under-edge trimming with text-box-trim: trim-start or over edge trimming with text-box-trim: trim-end. Yep, there are quite a few ways to not even do this thing at all!
Newer web browsers have deviated from the CSSWG specification working drafts by removing the leading value and replacing it with auto, despite the “Do not ship (yet)” warning (*shrug*).
Naturally, text-box-edge accepts two values (an instruction regarding the over edge, then an instruction regarding the under edge). However, auto must be used solo.
text-box-edge: auto; /* Works */
text-box-edge: ex auto; /* Doesn't work */
text-box-edge: auto alphabetic; /* Doesn't work */
I could explain all the scenarios in which auto would work, but none of them are useful. I think all we want from auto is to be able to set the over or under edge to auto and the other edge to something else, but this is the only thing that it doesn’t do. This is a problem, but we’ll dive into that shortly.
Trim above the ascenders and/or below the descenders
The text value will trim above the ascenders if used as the first value and below the descenders if used as the second value and is also the default value if you fail to declare the second value. (I think you’d want it to be auto, but it won’t be.)
text-box-edge: ex text; /* Valid */
text-box-edge: ex; /* Computed as `text-box-edge: ex text;` */
text-box-edge: text alphabetic; /* Valid */
text-box-edge: text text; /* Valid */
text-box-edge: text; /* Computed as `text-box-edge: text text;` */
It’s worth noting that ascender and descender height metrics come from the fonts themselves (or not!), so text can be quite finicky. For example, with the Arial font, the ascender height includes diacritics and the descender height includes descenders, whereas with the Fraunces font, the descender height includes diacritics and I don’t know what the ascender height includes. For this reason, there’s talk about renaming text to from-font.
Trim above the cap height only
To trim above the cap height:
text-box-edge: cap; /* Computed as text-box-edge: cap text; */
Remember, undeclared values default to text, not auto (as demonstrated above). Therefore, to opt out of trimming the under edge, you’d need to use trim-start instead of trim-both:
text-box-trim: trim-start; /* Not text-box-trim: trim-both; */
text-box-edge: cap; /* Not computed as text-box-edge: cap text; */
Trim above the cap height and below the alphabetic baseline
To trim above the cap height and below the alphabetic baseline:
text-box-trim: trim-both;
text-box-edge: cap alphabetic;
By the way, the “Cap height to baseline” option of Figma’s “Vertical trim” setting does exactly this. However, its Dev Mode produces CSS code with outdated property names (leading-trim and text-edge) and outdated values (top and bottom).
Trim above the x-height only
To trim above the x-height only:
text-box-trim: trim-start;
text-box-edge: ex;
Trim above the x-height and below the alphabetic baseline
To trim above the x-height and below the alphabetic baseline:
text-box-trim: trim-both;
text-box-edge: ex alphabetic;
Trim below the alphabetic baseline only
To trim below the alphabetic baseline only, the following won’t work (things were going so well for a moment, weren’t they?):
This is because the first value is always the mandatory over-edge value whereas the second value is an optional under-edge value. This means that alphabetic isn’t a valid over-edge value, even though the inclusion of trim-end suggests that we won’t be providing one. Complaints about verbosity aside, the correct syntax would have you declare any over-edge value even though you’d effectively cancel it out with trim-end:
text-box-trim: trim-end;
text-box-edge: [any over edge value] alphabetic;
What about ideographic glyphs?
It’s difficult to know how web browsers will trim ideographic glyphs until they do, but you can read all about it in the spec. In theory, you’d want to use the ideographic-ink value for trimming and the ideographic value for no trimming, both of which aren’t unsupported yet:
text-box-edge: ideographic; /* No trim */
text-box-edge: ideographic-ink; /* Trim */
text-box-edge: ideographic-ink ideographic; /* Top trim */
text-box-edge: ideographic ideographic-ink; /* Bottom trim */
text-box, the shorthand property
If you’re not keen on the verbosity of text box trimming, there’s a shorthand text-box property that makes it somewhat inconsequential. All the same rules apply.
/* Syntax */
text-box: [text-box-trim] [text-box-edge (over)] [text-box-edge (under)]?
/* Example */
text-box: trim-both cap alphabetic;
Final thoughts
At first glance, text-box-trim and text-box-edge might not seem all that interesting, but they do make spacing elements a heck of a lot simpler.
Is the current proposal the best way to handle text box trimming though? Personally, I don’t think so. I think text-box-trim-start and text-box-trim-end would make a lot more sense, with text-box-trim being used as the shorthand property and text-box-edge not being used at all, but I’d settle for some simplification and/or consistent practices. What do you think?
When it comes to on-page SEO, there’s one element that plays a pivotal role in both search engine rankings and user engagement: the HTML title tag. Often overlooked, this small but mighty piece of code can have a significant impact on how your website is perceived by search engines like Google and by potential visitors browsing the search engine results pages.
I collect a bunch of links in a bookmarks folder. These are things I fully intend to read, and I do — eventually. It’s a good thing bookmarks are digital, otherwise, I’d need a bigger coffee table to separate them from the ever-growing pile of magazines.
The benefit of accumulating links is that the virtual pile starts revealing recurring themes. Two seemingly unrelated posts published a couple months apart may congeal and become more of a dialogue around a common topic.
I spent time pouring through a pile of links I’d accumulated over the past few weeks and noticed a couple of trending topics. No, that’s not me you’re smelling — there’s an aroma of nostalgia in the air., namely a newfound focus on learning web fundamentals and some love for manual deployments.
Ultimately, it is not about AI replacing developers, but about developers adapting and evolving with the tools. The ability to learn, understand, and apply the fundamentals is essential because tools will only take you so far without the proper foundation.
ShopTalk 629: The Great Divide, Global Design + Web Components, and Job Titles
Chris and Dave sound off on The Great Divide in this episode and the rising value of shifting back towards fundamentals:
Dave: But I think what is maybe missing from that is there was a very big feeling of disenfranchisement from people who are good and awesome at CSS and JavaScript and HTML. But then were being… The market was shifting hard to these all-in JavaScript frameworks. And a lot of people were like, “I don’t… This is not what I signed up for.”
[…]
Dave: Yeah. I’m sure you can be like, “Eat shit. That’s how it is, kid.” But that’s also devaluing somebody’s skillset. And I think what the market is proving now is if you know JavaScript or know HTML, CSS, and regular JavaScript (non-framework JavaScript), you are once again more valuable because you understand how a line of CSS can replace 10,000 lines of JavaScript – or whatever it is.
Chris: Yeah. Maybe it’s coming back just a smidge–
Dave: A smidge.
Chris: –that kind of respecting the fundamental stuff because there’s been churn since then, since five years ago. Now it’s like these exclusively React developers we hired, how useful are they anymore? Were they a little too limited and fundamental people are knowing more? I don’t know. It’s hard to say that the job industry is back when it doesn’t quite feel that way to me.
Dave: Yeah, yeah. Yeah, who knows. I just think the value in knowing CSS and HTML, good HTML, are up more than they maybe were five years ago.
Just a Spec: HTML Finally Gets the Respect It Deserves
Jared and Ayush riffin’ on the first ever State of HTML survey, why we need it, and whether “State of…” surveys are representative of people who work with HTML.
[…] once you’ve learned about divs and H’s 1 through 6, what else is there to know? Quite a lot, as it turns out. Once again, we drafted Lea Verou to put her in-depth knowledge of the web platform to work and help us craft a survey that ended up reaching far beyond pure HTML to cover accessibility, web components, and much more.
[…]
You know, it’s perfectly fine to be an expert at HTML and CSS and know very little JavaScript. So, yeah, I think it’s important to note that as we talk about the survey, because the survey is a snapshot of just the people who know about the survey and answer the questions, right? It’s not necessarily representative of the broad swath of people around the world who have used HTML at all.
[…]
So yeah, a lot of interest in HTML. I’m talking about HTML. And yeah, in the conclusion, Lea Verou talks about we really do have this big need for more extensibility of HTML.
I’m not surprised. I mean, when someone who’s only ever used React can see what HTML does, I think it’s usually a huge revelation to them.
[…]
It just blows their minds. And it’s kind of like you just don’t know what you’re missing out on up to a point. And there is a better world out there that a lot of folks just don’t know about.
[…]
I remember a while back seeing a post come through on social media somewhere, somebody’s saying, oh, I just tried working with HTML forms, just standard HTML forms the first time and getting it to submit stuff. And wait, it’s that easy?
Yeah, last year when I was mentoring a junior developer with the Railsworld conference website, she had come through Bootcamp and only ever done React, and I was showing her what a web component does, and she’s like, oh, man, this is so cool. Yeah, it’s the web platform.
Reckoning: Part 4 — The Way Out
Alex Russell in the last installment of an epic four-part series well worth your time to fully grasp the timeline, impact, and costs of modern JavsaScript frameworks to today’s development practices:
Never, ever hire for JavaScript framework skills. Instead, interview and hire only for fundamentals like web standards, accessibility, modern CSS, semantic HTML, and Web Components. This is doubly important if your system uses a framework.
Semi-Annual Reminder to Learn and Hire for Web Standards
This is a common cycle. Web developers tire of a particular technology — often considered the HTML killer when released — and come out of it calling for a focus on the native web platform. Then they decide to reinvent it yet again, but poorly.
There are many reasons companies won’t make deep HTML / CSS / ARIA / SVG knowledge core requirements. The simplest is the commoditization of the skills, partly because framework and library developers have looked down on the basics.
The anchor element
Heydon Pickering in a series dedicated to HTML elements, starting alphabetically with the good ol’ anchor :
Sometimes, the is referred to as a hyperlink, or simply a link. But it is not one of these and people who say it is one are technically wrong (the worst kind of wrong).
[…]
Web developers and content editors, the world over, make the mistake of not making text that describes a link actually go inside that link. This is collosally unfortunate, given it’s the main thing to get right when writing hypertext.
At the risk of being old and out-of-touch: if you don’t know how to write some code, you probably shouldn’t use code that Chat GPT et al write for you.
[…]
It’s not bulletproof, but StackOverflow provides opportunities to learn and understand the code in a way that AI-generated code does not.
What Skills Should You Focus on as Junior Web Developer in 2024?
Let’s not be old-man-shakes-fist-at-kids.gif about this, but learning the fundamentals of tech is demonstrateably useful. It’s true in basketball, it’s true for the piano, and it’s true in making websites. If you’re aiming at a long career in websites, the fundamentals are what powers it.
[…]
The point of the fundamentals is how long-lasting and transferrable the knowledge is. It will serve you well no matter what other technologies a job might have you using, or when the abstractions over them change, as they are want to do.
As long as we’re talking about learning the fundamentals…
The Basics
Oh yeah, and of course there’s this little online course I released this summer for learning HTML and CSS fundamentals that I describe like this:
The Basics is more for your clients who do not know how to update the website they paid you to make. Or the friend who’s learning but still keeps bugging you with questions about the things they’re reading. Or your mom, who still has no idea what it is you do for a living. It’s for those whom the entry points are vanishing. It’s for those who could simply sign up for a Squarespace account but want to understand the code it spits out so they have more control to make a site that uniquely reflects them.
Not all this nostalgia is reserved only for HTML and CSS, but for deploying code, too. A few recent posts riff on what it might look like to ship code with “buildless” or near “buildless” workflows.
It is extraordinarily liberating. Yes, there are some ergonomic inefficiencies, but at the end of the day it comes out in the wash. You might have to copy-and-paste some HTML, but in my experience I’d spend that much time or more debugging a broken build or dependency hell.
Probably not. I’d say for production-grade development, we’re not quite there yet. Performance tradeoffs are a big part of it, but there are lots of other small problems that you’d likely run into pretty soon once you hit a certain level of complexity.
For smaller sites or side projects though, I can imagine going the buildless route – just to see how far I can take it.
If you’re thinking that your next project couldn’t possibly be made without a build step, let me tell you about a phrase I first heard in the indie web community: “Manual ‘till it hurts”. It’s basically a two-step process:
Start doing what you need to do by hand.
When that becomes unworkable, introduce some kind of automation.
It’s remarkable how often you never reach step two.
I’m not saying premature optimisation is the root of all evil. I’m just saying it’s premature.
That’s it for this pile of links and good gosh my laptop feels lighter for it. Have you read other recent posts that tread similar ground? Share ’em in the comments.
PSA: Today’s the day that Google’s performance tools officially stops supporting the First Input Delay (FID) metric that was replaced by Interaction to Next Paint (INP).
Jim hit a snag while working on a form. Placing labels next to inputs is trivial with flexbox, sure, but what happened in Jim’s case was a bit of dead-clicking between the labels and radio buttons.
The issue? Not the markup, that’s all semantic and cool. Turns out the gap he placed between the elements is non-interactive. Makes sense when you think about it, but frustrating nonetheless because it looks like a bug and feels like a bug even though there’s nothing wrong with the styles.
The solution’s easy enough: padding along the inside edge of the input extends its box dimensions, allowing the added space to remain interactive with visual spacing. Margin wouldn’t work since it’s akin to gap in that it pushes the element’s box instead of expanding it.
I’m linking up Jim’s article because it’s a perfect demonstration that CSS is capable of accomplishing the same thing in many ways. It’s easy to fall into the trap of “single-solution” thinking, but CSS doesn’t want anything to do with that. It’ll instead challenge you to adapt toward open-minded strategies, perhaps even defensive ones.