bl Retraction: Self-assembled organic nanotubes embedding hydrophobic molecules within solid bilayer membranes By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM90171A, Retraction Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Naohiro Kameta, Masumi Asakawa, Mitsutoshi Masuda, Toshimi ShimizuTo cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Mapping deformation dynamics to composition of topologically-active DNA blends By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM01065E, PaperKarthik R. Peddireddy, Ryan McGorty, Rae M. Robertson-AndersonWe leverage in situ enzymatic topological conversion and OpTiDDM to map the deformation dynamics of DNA blends with over 70 fractions of linear, ring and supercoiled molecules that span the phase space of possible topological compositions.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Scale-dependent interactions enable emergent microrheological stress response of actin–vimentin composites By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM00988F, PaperJulie Pinchiaroli, Renita Saldanha, Alison E. Patteson, Rae M. Robertson-Anderson, Bekele J. GurmessaThe unique mechanical behaviors of actin–vimentin composites in both linear and nonlinear regimes are shaped by the complex interactions among actin entanglements, vimentin crosslinking, and poroelastic properties.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Liquid crystalline collagen assemblies as substrates for directed alignment of human Schwann cells By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM00534A, Paper Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Homa Ghaiedi, Luis Carlos Pinzon Herrera, Saja Alshafeay, Leonard Harris, Jorge Almodovar, Karthik NayaniCollagen is a key component of the extracellular matrix (ECM) and well-oriented domains of collagen are important for mimicking the local cell environment in vitro. Here, we demonstrate macroscopic alignment on collagen in 2-D substrates and 3-D hydrogels.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Hydrophobic fouling-resistant electrospun nanofiber membranes from poly(vinylidene fluoride)/polyampholyte blends By pubs.rsc.org Published On :: Soft Matter, 2024, 20,8654-8662DOI: 10.1039/D4SM00817K, PaperAnuja S. Jayasekara, Luca Mazzaferro, Ryan O’Hara, Ayse Asatekin, Peggy CebeThis study reports the fabrication of non-woven fibrous membranes from electrospinning blended solutions of PVDF with a random polyampholyte amphiphilic copolymer (r-PAC) in N,N-dimethylformamide and methanol.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Entropically and enthalpically driven self-assembly of a naphthalimide-based luminescent organic π-amphiphile in water By pubs.rsc.org Published On :: Soft Matter, 2024, 20,8684-8691DOI: 10.1039/D4SM00986J, PaperSk Mursed Ali, Sujauddin Sk, Shuvajyoti Sarkar, Sayani Das, Nayim Sepay, Mijanur Rahaman MollaEntropically and enthalpically favourable vesicular self-assembly of a naphthalimide based water soluble luminescent organic dipolar building block is reported.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Structure affinity of the Langmuir monolayer and the corresponding Langmuir–Blodgett film revealed by X-ray techniques By pubs.rsc.org Published On :: Soft Matter, 2024, 20,8601-8609DOI: 10.1039/D4SM01050G, PaperAlvina V. Alexandrova, Maxim A. Shcherbina, Yuriy L. Repchenko, Yuriy M. Selivantiev, Alexander V. Shokurov, Vladimir V. Arslanov, Sofiya L. SelektorUsing X-ray techniques, crown-substituted chromoionophore Langmuir–Blodgett films were proved to preserve the fine structure and functional features of pre-organized monolayers.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Influence of counterion type on the scattering of a semiflexible polyelectrolyte By pubs.rsc.org Published On :: Soft Matter, 2024, 20,8610-8620DOI: 10.1039/D4SM00874J, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Anish Gulati, Jack F. Douglas, Olga Matsarskaia, Carlos G. LopezUnderstanding the influence of counterion and backbone solvation on the conformational and thermodynamic properties of polyelectrolytes in solution is one of the main open challenges in polyelectrolyte science.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl The role of macrocycles in supramolecular assembly with polymers By pubs.rsc.org Published On :: Soft Matter, 2024, 20,8549-8560DOI: 10.1039/D4SM01053A, Review ArticleRuslan Kashapov, Yuliya Razuvayeva, Elena Fedorova, Lucia ZakharovaSupramolecular self-assembly of polymers with macrocycles has attracted the attention because it enables the spontaneous creation of nanostructures with unique properties.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Co-assembly of Cellulose Nanocrystals and Gold Nanorods: Insights from Molecular Dynamics Modelling By pubs.rsc.org Published On :: Soft Matter, 2024, Accepted ManuscriptDOI: 10.1039/D4SM00871E, Paper Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Jiaxin Hou, William W Sampson, Ahu Gumrah DumanliA coarse-grained molecular dynamics model is developed to explore the co-assembly of cellulose nanocrystals (CNCs) and gold nanorods (AuNRs) under sedimentation conditions with varying vol- umetric concentration and particle-size ratios....The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Fibrotaxis: gradient-free, spontaneous and controllable droplet motion on soft solids By pubs.rsc.org Published On :: Soft Matter, 2024, Accepted ManuscriptDOI: 10.1039/D4SM01022A, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Sthavishtha Bhopalam, Jesus Bueno, Hector GomezMost passive droplet transport strategies rely on spatial variations of material properties to drive droplet motion, leading to gradient-based mechanisms with intrinsic length scales that limit the droplet velocity or...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Ring-shaped nanoparticle assembly and cross-linking on lipid vesicle scaffolds By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM01010H, Communication Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Gizem Karabiyik, Aldo Jesorka, Irep GözenWe show the assembly and cross-linking of carboxylate-modified polystyrene nanoparticles into flexible circular, ring-shaped structures with micrometer sized diameters around the base of surface-adhered giant lipid vesicles.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Reversible pH-responsive supramolecular aggregates from viologen based amphiphiles – A molecular design perspective By pubs.rsc.org Published On :: Soft Matter, 2024, Accepted ManuscriptDOI: 10.1039/D4SM00695J, PaperRedhills L. Narendran, Archita PatnaikpH responsive self-assembled supramolecular systems in water hold tremendous promise spanning across the various realms of science and technology. Herein, we report the design and synthesis of benzyl viologen (BV)...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl A multi-scale framework for predicting α-cyclodextrin assembly on polyethylene glycol axles By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM01048E, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Cameron D. Smith, Chenfeng Ke, Wenlin ZhangWe predict the assembly and time-dependent distribution of cyclodextrin along PEG axles by combining atomistic molecular dynamics with an analytical treatment of bulk diffusion. Our kinetic Monte Carlo can aid in the design of polypseudorotaxanes.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Biomimetic mineralization of positively charged silica nanoparticles templated by thermoresponsive protein micelles: applications to electrostatic assembly of hierarchical and composite superstructures By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM00907J, PaperNada Y. Naser, William C. Wixson, Helen Larson, Brandi M. Cossairt, Lilo D. Pozzo, François BaneyxExploiting the ability of a solid-binding elastin-like peptide to micellize, we mineralize monodisperse silica nanoparticles whose positive surface charge enables one-step electrostatic assembly of various mono- and bi-material superstructures.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
bl Can Guava, Chikoo, Papaya Reduce Blood Sugar? By www.rediff.com Published On :: Wed, 08 May 2024 12:15:02 +0530 rediffGURU Komal Jethmalani, a diabetes expert and dietician, has the answer for you. Full Article
bl An Introduction to Variable Fonts By 24ways.org Published On :: Wed, 04 Dec 2019 12:00:00 +0000 Jason Pamental forges a path through the freshly laid snowy landscape of variable fonts. Like a brave explorer in a strange new typography topology let Jason show you the route to some fantastic font feats. Everything you thought you knew has changed. Everything you thought you knew about fonts just changed (for the better). Typography has always been a keen interest of mine, long before we were able to use fonts on the web. And while we’ve had the ability to that now for ten years, we’ve always been constrained by balancing the number of fonts we want to use with the amount of data to be downloaded by the viewer. While good type and typography can bring huge benefits to design, readability, and overall experience—include too many fonts and you negatively impact performance and by extension, user experience. Three years ago, an evolution of the OpenType font format was introduced that changes things in some really remarkable ways. Introducing OpenType Font Variations (aka ‘variable fonts’) As long as I’ve used digital fonts, I’ve had to install separate files for every width, weight, or variant that I want to use. Bold in one file, light in another, condensed italic another one yet again. Installing a whole family for desktop use might involve nearly 100 files. The variable font format is an evolution of OpenType (the format we’ve all been using for years) that allows a single file to contain all of those previously separate files in a single, highly efficient one. The type designer can decide which axes to include, and define minimum and maximum values. See the Pen Variable font, outlined by Jason Pamental (@jpamental) on CodePen. On the web, that means we can load a single file and use CSS to set any axis, anywhere along the allowable range, without any artificial distortion by the browser. Some fonts might only have one axis (weight being the most common), and some may have more. A few are defined as ‘registered’ axes, which are the most common: width, weight, slant, italic, and optical size—but the format is extensible expressly so that designers can define their own custom axes and allow any sort of variation they want to create. Let’s see how that works on the desktop. Just like before, but different One of the ways the new format preserves backwards compatibility with other applications that don’t yet explicitly support variable fonts is something called ’named instances’—which are essentially mapped aliases for what used to be separate files. So whatever the typeface designer had in mind for ‘bold condensed’ would simply map to the appropriate points on the variation axes for weight and width. If the font has been made correctly, those instances will allow the font to be installed and used in recent versions of Windows and the MacOS just like they always have been. If the application fully supports variable fonts, then you would also be able to manipulate individual axes as you see fit. Currently that includes recent versions of Adobe Illustrator, Photoshop, and InDesign, and also recent versions of the popular web/UI design application Sketch. Discovering the secrets of style To get all of the specifics of what a font supports, especially for use on the web, you’ll want to do one of two things: check the following website, or download Firefox (or better, do both). If you have the font file and access to the web, go check out Roel Nieskens’ WakamaiFondue.com (What Can My Font Do… get it?). Simply drag-and-drop your font file as directed, and you’ll get a report generated right there showing what features the font has, languages its supports, file size, number of glyphs, and all of the variable axes that font supports, with low/high/default values displayed. You even get a type tester and some sliders to let you play around with the different axes. Take note of the axes, values, and defaults. We’ll need that info as we get into writing our CSS. If you don’t have access to the font file (if it’s hosted elsewhere, for example), you can still get the information you need simply by using it on a web page and inspecting it with the Firefox developer tools. There are lots of fantastic videos on them (like this one and this one), but here’s the short version. Thanks to Jen Simmons and the FF dev tools team, we have some incredible tools to work with web fonts right in the browser. Inspect a text element in the font you’re looking to use, and then click on the ‘fonts’ tab over to the right. You’ll then be greeted with a panel of information that shows you everything about the font, size, style, and variation axes right there! You can even change any of those values and see it rendered right in the browser, and if you then click on the ‘changes’ tab, you can easily copy and paste the changed CSS to bring right back into your code. Now that you have all of the available axes, values, defaults, and their corresponding 4-character axis ’tags’—let’s take a look at how to use this information in practice. The first thing to note is that the five ‘registered’ axes have lower-case tags (wght, wdth, ital, slnt, opsz), whereas custom axis tags are always uppercase. Browsers are taking note, and mismatching upper and lower case can lead to unpredictable results. There are two ways to implement the registered axes: through their corresponding standard CSS attributes, and via a lower-level syntax of font-variation-settings. It’s very important to use the standard attributes wherever possible, as this is the only way for the browser to know what to do if for some reason the variable font does not load, or for any alternate browsing method to infer any kind of semantics from our CSS (i.e. a heavier font-weight value signifying bolder text). While font-variation-settings is exactly what we should be using for custom axes (and for now, with italics or italics and slant axes), font-weight (wght) and font-stretch (wdth) are both supported fully in every browser that supports variable fonts. Now let’s have a look at the five registered axes and how to use them. Weight Probably the most obvious axis is weight—since almost every typeface is designed with at least regular and bold weights, and quite often much lighter/thinner and bolder extremes. With a variable font, you can use the standard attribute of font-weight and supply a number somewhere between the minimum and maximum value defined for the font rather than just a keyword like normal or bold. According to the OpenType specification, 400 should equate to normal for any given font, but in practice you’ll see that at the moment it can be quite varied by typeface. p { font-weight: 425; } strong { font-weight: 675; } See the Pen Variable Fonts Demo: Weight by Jason Pamental (@jpamental) on CodePen. Why you’ll like this Besides being able to make use of a broader range for things like big quotes in an extra-thin weight, or adding even more emphasis with a super-chonky one, you should try varying what it means for something to be ‘bold’. Using a ’slightly less bold’ value for bold text inline with body copy (i.e. the ’strong’ tag) can bring a bit more legibility to your text while still standing out. The heavier the weight, the more closed the letterforms will be, so by getting a bit more subtle at smaller sizes you can still gain emphasis while maintaining a bit more open feel. Try setting strong to a font-weight somewhere between 500-600 instead of the default 700. Width Another common variation in typeface design is width. It’s often seen referred to as ‘condensed’ or ‘compressed’ or ‘extended’—though the specifics of what these keywords mean is entirely subjective. According to the spec, 100 should equate to a ’normal’ width, and valid values can range from 1 to 1000. Like weight, it does map to an existing CSS attribute—in this case the unfortunately-named font-stretch attribute and is expressed as a percentage. In these early stages of adoption many type designers and foundries have not necessarily adhered to this standard with the numeric ranges, so it can look a little odd in your CSS. But a width range of 3%-5% is still valid, even if in this case 5% is actually the normal width. I’m hopeful that with more nudging we’ll see more standardization emerge. p { font-stretch: 89%; } See the Pen Variable Fonts Demo: Width by Jason Pamental (@jpamental) on CodePen. Why you’ll like this One of the tricky things about responsive design is making sure your larger headings don’t end up as monstrous one-word-per-line ordeals on small screens. Besides tweaking font-size, try making your headings slightly narrower as well. You’ll fit more words per line without sacrificing emphasis or hierarchy by having to make the font-size even smaller. Italic The Italic axis is more or less what you’d expect. In most cases it’s a boolean 0 or 1: off (or upright) or on—usually meaning slanted strokes and often glyph replacements. Often times the lower case ‘a’ or ‘g’ have slightly different Italic forms. While it’s certainly possible to have a range rather than strictly 0 or 1, the off/on scenario is likely the most common that you’ll encounter. Unfortunately, while it is intended to map to font-style: italic, this is one of the areas where browsers have not fully resolved the implementation so we’re left having to rely upon the lower-level syntax of font-variation-settings. You might give some thought to using this in conjunction with a CSS custom property, or variable, so you don’t have to redeclare the whole string if you just want to alter the Italic/upright specification. :root { --text-ital: 0; } body { font-variation-settings: 'ital' var(--text-ital); } em { --text-ital: 1; } See the Pen Variable Fonts Demo: Italic by Jason Pamental (@jpamental) on CodePen. Why you’ll like this Having Italics as well as upright, along with weight and any other axes available, means you can use one or two files instead of 4 to handle your body copy. And with the range of axes available, you might just not need anything else. Slant The slant axis is similar to Italic, but different in two key ways. First, it is expressed as a degree range, and according to the OpenType specification should be ‘greater than -90 and less than +90’, and second, does not include glyph substitution. Usually associated with sans-serif typeface designs, it allows for any value along the range specified. If the font you’re using only has a slant axis and no italics (I’ll talk about that in a bit), you can use the standard attribute of ‘font-style’ like so: em { font-style: oblique 12deg; } If you have both axes, you’ll need to use font-variation-settings—though in this case you just supply a numeric value without the deg. :root { --text-slnt: 0; } body { font-variation-settings: 'slnt' var(--text-slnt); } em { --text-slnt: 12; } See the Pen Variable Fonts Demo: Slant by Jason Pamental (@jpamental) on CodePen. Why you’ll like this The slant axis allows for anything within the defined range, so opportunities abound to set the angle a little differently, or add animation so that the text becomes italic just a little after the page loads. It’s a nice way to draw attention to a text element on the screen in a very subtle way. Optical Size This is a real gem. This is a practice that dates back over 400 years, whereby physically smaller type would be cut with slightly thicker strokes and a bit less contrast in order to ensure they would print well and be legible at smaller sizes. Other aspects can be tailored as well, like apertures being wider, terminals more angled, or bowls enlarged. Conversely, larger point sizes would be cut with greater delicacy, allowing for greater contrast and fine details. While this was in many ways due to poorer quality ink, paper, and type—it still had the effect of allowing a single typeface design to work optimally at a range of physical sizes. This practice was lost, however, with the shift to photo typesetting and then digital type. Both newer practices would take a single outline and scale it, so either the fine details would be lost for all, or the smaller sizes would end up getting spindly and frail (especially on early lower-resolution screens). Regaining this technique in the form of a variable axis gives tremendous range back to individual designs. The concept is that the numeric value for this axis should match the rendered font-size, and a new attribute was introduced to go along with it: font-optical-sizing. The default is auto, and this is supported behavior in all shipping browsers (well, as soon as Chrome 79 ships). You can force it to off, or you can set an explicit value via font-variation-settings. body { font-optical-sizing: auto; } See the Pen Variable Fonts Demo: Optical Size (Auto) by Jason Pamental (@jpamental) on CodePen. Or: :root { --text-opsz: 16; } body { font-variation-settings: 'opsz' var(--text-opsz); } h1 { --text-opsz: 48; font-size: 3em; } See the Pen Variable Fonts Demo: Optical Size (Manual) by Jason Pamental (@jpamental) on CodePen. Why you’ll like this A good optical size axis makes type more legible at smaller sizes, and tailoring that to the size it’s used makes a remarkable difference. On the other end of the spectrum, the increased stroke contrast (and anything else the type designer decides to vary) can mean a single font can feel completely different when used larger for headings compared with body copy. Look no further than Roslindale from David Jonathan Ross’ Font of the Month Club, in use on my site to see how big a difference it can be. I’m using a single font for all the headings and body copy, and they feel completely different. Slant & Italics I’m not sure that the creators of the specification were thinking of this when it was written, but technically there is no reason you can’t have separate axes for slant (i.e. angle) and Italic (i.e. glyph substitution). And indeed both DJR and Stephen Nixon have done just that, with Roslindale Italic and Recursive, respectively. With Recursive, you can see how much greater flexibility you can get by separating the angle from the glyphs. It can impart a completely different feel to a block of text to have an angle without the alternate forms. With the state of Italic implementation and the fact that they share the same CSS attribute, this is on that requires the use of font-variation-settings in order to set the attributes separately. :root { --text-ital: 0; --text-slnt: 0; } body { font-variation-settings: 'ital' var(--text-ital), 'slnt' var(--text-slnt); } em { --text-ital: 1; --text-slnt: 12; } .slanted { --text-slnt: 12; } .italic-forms-only { --text-ital: 1; } See the Pen Variable Fonts Demo: Slant and Italic by Jason Pamental (@jpamental) on CodePen. Why you’ll like this Having these axes separated can give you greater design flexibility when creating your typographic system. In some cases you might opt for a slant only, in others both angle and glyph substitution. While it may not be the most critical of features, it does add an extra dimension to the utility and dynamic range of a font. Custom axes While so far there are only five ‘registered’ axes, type designers can also create their own. Any aspect of the typeface design could potentially become an axis. There are the more ‘expected’ ones like serif shape or perhaps x-height (the height of the lower case letters) to much more inventive ones like ‘gravity’ or ‘yeast’. I’ll let someone else elaborate on those, but I will show an example of one I hope will become more common in text and UI designs: grade. Grade The notion of ‘grade’ in a typeface was first introduced to compensate for ink gain on different kinds of paper and presses as a way to visually correct across workflows and have a typeface appear the same on every one. The concept is that you’re essentially altering the weight of the font without changing the spacing. Having this as a variable axis can be useful in a couple of ways. Creating a higher-contrast mode, where the text gets a bit heavier without reflowing, can make text more legible in lower-light situations or in designing for ‘dark mode’. And when animating interface elements it can be add a bit heavier text grade along with a background color shift on hover or tap. It can also come in handy in responding to lower-resolution screens, where type can easily become a bit spindly. Note that custom axes need to be specified in all caps. :root { --text-GRAD: 0; } body { font-variation-settings: 'GRAD' var(--text-GRAD); } body.dark { --text-GRAD: 0.5; } See the Pen Variable Fonts Demo: Grade by Jason Pamental (@jpamental) on CodePen. Why you’ll like this I think the biggest use for a grade axis will be for accessibility—designing for things like a dark or high-contrast mode. But you’ll also be able to have some fun with UI animations, like making text heavier on buttons or navigation on hover or focus without altering the physical space occupied by the text. Support Happily support for variable fonts is quite good: recent versions of MacOS and Windows offer support at the OS level, meaning that they can be installed on your system and if the font has any ’named instances’, they will show up in any application’s font menu just as if they were separate fonts. If you have recent versions of Adobe CC applications Illustrator, Photoshop, or InDesign—or recent versions of Sketch—you can manipulate all of the available axes. In browsers, it’s better, and has been for quite some time. According to CanIUse.com it’s around 87%, but the more relevant bit for most is that both dominant mobile platforms and all the major shipping browsers support them. The only really glaring exception is IE11, and given that you can easily use @supports to scope the inclusion of variable fonts it’s perfectly safe to put them in production today. That’s the strategy in use on the new web platform for the State of Georgia in the US, and it’s been deployed on over 40 sites so far and is happily serving static fonts to state employees (IE11 is their default browser) and variable ones to millions of citizens across the state. p { font-family: YourStaticFontFamily; } @supports (font-variation-settings: normal) { p { font-family: YourVariableFontFamily; } } Since CSS is always parsed completely before any other action is taken, you can be sure that browsers will never download both assets. Getting the fonts in your project For now, many of you will likely be self-hosting your variable fonts as at this point only Google is offering them through their API, and so far only in beta. There are a few key differences in how you structure your @font-face declaration, so let’s have a look. @font-face { font-family: "Family Name"; src: url("YourVariableFontName.woff2") format("woff2 supports variations"), url("YourVariableFontName.woff2") format("woff2-variations"); font-weight: [low] [high]; font-stretch: [low]% [high]%; font-style: oblique [low]deg [high]deg; } The first thing you might notice is that the src line is a bit different. I’ve included two syntaxes pointing to the same file, because the official specification has changed, but browsers haven’t caught up yet. Because we have color fonts on the horizon in addition to variable ones (and the possibility that some may be both variable and in color), the syntax needed to be more flexible. Thus the first entry—which could specify ‘woff2 supports variations color’ for a font that supports both. Once browsers understand that syntax, they’ll stop parsing the ’src’ line once they get here. For now, they’ll skip that and hit the second one with a format of woff2-variations, which all current browsers that support variable fonts will understand. For weight (font-weight) and width (font-stretch), if there is a corresponding axis, supply the low and high values (with the percentage symbol for width values). If there is no corresponding axis, just use the keyword ‘normal’. If there is a slant axis, supply the low and high values with ‘deg’ after each number. It’s worth noting that if there is also an italic axis (or only an italic axis and no slant), it’s best at this point to simply omit the font-style line entirely. By supplying these values, you create some guard rails that will help the browser know what to do if the CSS asks for a value outside the allowed range. This way if the weight range is 300-700 and you accidentally specify font-weight: 100, the browser will simply clamp to 300 and won’t try to synthesize a lighter weight. It’s worth noting that this only works with the standard CSS attributes like font-weight or font-stretch. If you use font-variation-settings to set values, the browser assumes you’re the expert and will attempt to synthesize the result even if it’s outside the normal range. Google Fonts is on the case, too Back in September, the Google Fonts team announced a beta version of their API that supports some variable fonts. That support is growing, and more fonts are on the way. If you want to play around with it today though, you can have a look at an article I wrote about how, and check out a CodePen I created that’s using it. Where to find them The first place you should look for variable fonts is Nick Sherman’s v-fonts.com, which has been serving as a de facto catalog site, listing pretty much every variable font available. You can also have a look on GitHub where you’ll find a bunch of projects (in varying stages of completeness, but there are some good ones to be found). Nick also maintains a Twitter account that will tweet/retweet lots of announcements and links, and I publish a newsletter on web typography where I’ll generally include a few links to noteworthy releases. You can also check out Laurence Penney’s Axis-Praxis.org site, the original variable fonts playground where you can put many of them (or even upload your own) into a type testing page that can give you loads of additional detail about available font features. In truth, many designers and foundries are experimenting with making them, so if you’re unsure about availability it’s always worthwhile to ask. Get in touch and I can probably help make the connection! Why it all matters While all of this might be interesting purely from an academic standpoint, there are some significant benefits and opportunities that come from adopting variable fonts. From a performance standpoint, while variable fonts may be larger than single-instance font files, they are still far smaller than the sum total of static files they replace—and often come in smaller than 3-4 single fonts. Which means that page load times could substantially improve. This is the driving motivation for Nielson/Norman Group’s inclusion of Source Sans Variable on their site last year, or what Google has been testing with Oswald Variable on sites 148 million times a day for the past several months. Basically just using them instead of a few static instances to reap the benefits of faster page loads and less code. But beyond that, what really excites me are the design possibilities. Once we have variable fonts on our sites, we’re free to get infinitely more expressive. And with the sophistication of our publishing systems, building some of that flexibility into our publishing process should not be far behind. So creating things like my experiment below shouldn’t be one-off exceptions, but rather part of a regular practice of bringing design back into the publishing process. See the Pen Layout variations, part deux by Jason Pamental (@jpamental) on CodePen. Go have fun I hope this has served as a good starting point to get into designing and developing with variable fonts. Send links and questions—I can’t wait to see what you make! And stay tuned—there just might be another post coming that goes even further ;) In the meantime, if you want to learn more about integrating variable fonts with all sorts of other ideas, check out the ever-amazing Mandy Michael’s site variablefonts.dev. About the author Jason spends much of his time working with clients to establish their typographic systems and digital strategy, helping design and development teams works smarter and faster, and running workshops about all of the above. He is a seasoned design and user experience strategy leader with over 20 years’ experience on the web in both creative and technical roles, and an Invited Expert to the W3C Web Fonts Working Group. Clients range from type industry giants, Ivy League and High Tech, to the NFL and America’s Cup. He also researches and writes on typography for the web: he’s author of Responsive Typography from O’Reilly, articles for TYPE Magazine, .Net Magazine, PRINT Magazine, HOW, Monotype.com, and frequent podcast guest. Author of online courses for Aquent’s Gymnasium platform and Frontend Masters. He’s an experienced speaker and workshop leader, having presented at over 50 national and international conferences. The real story: mainly he just follows Tristan and Tillie around Turner Reservoir, posting photos on Instagram. More articles by Jason Full Article Code typography
bl Interactivity and Animation with Variable Fonts By 24ways.org Published On :: Thu, 05 Dec 2019 12:00:00 +0000 Mandy Michael turns the corner on our variable font adventure and stumbles into a grotto of wonder and amazement. Not forgetting the need for a proper performance budget, Mandy shows how variable fonts can free your creativity from bygone technical constraints. If you read Jason’s introductory article about variable fonts, you’ll understand the many benefits and opportunities that they offer in modern web development. From this point on we’ll assume that you have either read Jason’s introduction or have some prior knowledge of variable fonts so we can skip over the getting started information. If you haven’t read up on variable fonts before jump over to “Introduction to Variable Fonts: Everything you thought you knew about fonts just changed” first and then come join me back here so we can dive into using variable fonts for interactivity and animations! Creative Opportunities If we can use variable fonts to improve the performance of our websites while increasing the amount of style variations available to us, it means that we no longer need to trade off design for performance. Creativity can be the driving force behind our decisions, rather than performance and technical limitations. Cookie text effect font: This Man is a Monster, by Comic Book Fonts. My goal is to demonstrate how to create interactive, creative text on the web by combining variable fonts with CSS and JavaScript techniques that you may already be familiar with. With the introduction of variable fonts, designs which would have previously been a heavy burden on performance, or simply impossible due to technical limitations, are now completely possible. Still I Rise Poem by Maya Angelou, Demo emphasising different words with variable fonts. View on Codepen. Variable fonts demo with CSS Grid using multiple weights and font sizes to emphasise different parts of the message. View on Codepen. The tone and intent of our words can be more effectively represented with less worry over the impacts of loading in “too many font weights” (or other styles). This means that we can start a new path and focus on representing the content in more meaningful ways. For example, emphasising different words, or phrases depending on their importance in the story or content. Candy Cane Christmas Themed Text Effect with FS Pimlico Glow by Font Smith. View on Codepen. Note: using variable fonts does not negate the need for a good web font performance strategy! This is still important, because after all, they are still fonts. Keep that in mind and check out some of the great work done by Monica Dinculescu, Zach Leatherman or this incredible article by Helen Homes. Variable Fonts & Animations Because variable fonts can have an interpolated range of values we can leverage the flexibility and interactive nature of the web. Rather than using SVG, videos or JavaScript to accomplish these effects, we can create animations or transitions using real text, and we can do this using techniques we may already be familiar with. This means we can have editable, selectable, searchable, copy-pastable text, which is accessible via a screenreader. Grass Variable Font Demo Growing Grass Variable Font Text. Demo on Codepen. This effect is achieved using a font called Decovar, by David Berlow. To achieve the animation effect we only need a couple of things to get started. First, we set up the font-family and make use of the new property font-variation-settings to access the different axes available in Decovar. h1 { font-family: "Decovar"; font-variation-settings: 'INLN' 1000, 'SWRM' 1000; } For this effect, we use two custom axis – the first is called “inline” and is represented by the code INLI and the second is “skeleton worm” represented by the code SWRM. For both axes, the maximum value is 1000 and the minimum value is 0. For this effect, we’ll make the most of the full axis range. Once we have the base set up, we can create the animation. There are a number of ways to animate variable fonts. In this demo, we’ll use CSS keyframe animations and the font-variation-settings property, but you can also use CSS transitions and JavaScript as well. The code below will start with the “leaves” expanded and then shrink back until it disappears. @keyframes grow { 0% { font-variation-settings: 'INLN' 1000, 'SWRM' 1000; } 100% { font-variation-settings: 'INLN' 1000, 'SWRM' 0; } } Once we have created the keyframes we can add the animation to the h1 element, and that is the last piece needed in order to create the animation. h1 { font-family: "Decovar"; font-variation-settings: 'INLN' 1000, 'SWRM' 1000; animation: grow 4s linear alternate infinite; } What this demonstrates is that typically, to accomplish effects like this, the heavy lifting is done by the font. We really only need a few lines of CSS for the animation, which if you think about it, is pretty incredible. There are all sorts of interesting, creative applications of variable fonts, and a lot of incredible fonts you can make the most of. Whether you want to create that “hand-writing” effect that we often see represented with SVG, or something a little different, there are a lot of different options. Duos Writer: Hand Writing Demo of hand writing variable font, Duos Writer by Underware. Decovar: Disappearing Text See the Pen CSS-only variable font demo using Decovar Regular by Mandy Michael (@mandymichael) on CodePen. Cheee: Snow Text Snow Text Effect - Text fills up with snow and gets “heavier” at the bottom as more snow gathers. Featuring “Cheee” by OhNoTypeCo. View on Codepen. Variable Fonts, Media Queries and Customisation It’s not that these are just beautiful or cool effects, what they demonstrate is that as developers and designers we can now control the font itself and that that means is that variable fonts allow typography on the web to adapt to the flexible nature of our screens, environments and devices. We can even make use of different CSS media queries to provide more control over our designs based on environments, light contrast and colour schemes. Though the CSS Media Queries Level 5 Spec is still in draft stages, we can experiment with the prefers-color-scheme (also known as dark mode) media query right now! Dark Mode featuring Oozing Cheee by OhNoTypeCo Oozing Dark Mode Text featuring “Cheee” by OhNoTypeCo. View Demo on Codepen. The above example uses a font called “Cheee” by OhNoTypeCo and demonstrates how to make use of a CSS Transition and the prefers-color-scheme media query to transition the axis of a variable font. h1 { font-family: “Cheee" font-variation-settings: "TEMP" 0; transition: all 4s linear; } @media (prefers-color-scheme: dark) { h1 { font-variation-settings: "TEMP" 1000; } } Dark mode isn’t just about changing the colours, it’s important to consider things like weight as well. It’s the combination of the weight, colour and size of a font that determines how legible and accessible it is for the user. In the example above, I’m creating a fun effect – but more practically, dark mode allows us to modify the contrast and styles to ensure better legibility and usability in different environments. What is even more exciting about variable fonts in this context is that if developers and designers can have this finer control over our fonts to create more legible, accessible text, it also means the user has access to this as well. As a result, users that create their own stylesheets to customise the experience to their specific requirements, can now adjust the pages font weight, width or other available axis to what best suits them. Providing users with this kind of flexibility is such an incredible opportunity that we have never had before! As CSS develops, we’ll have access to different environmental and system features that allow us to take advantage of our users unique circumstances. We can start to design our typography to adjust to things like screen width - which might allow us to tweak the font weight, width, optical size or other axes to be more readable on smaller or larger screens. Where the viewport is wide we can have more detail, when its smaller in a more confined space we might look at reducing the width of the font—this helps to maintain the integrity of the design as the viewport gets smaller or, to fit text into a particular space. See the Pen CSS is Awesome - Variable fonts Edition. by Mandy Michael (@mandymichael) on CodePen. We have all been in the situation where we just need the text to be slightly narrower to fit within the available space. If you use a variable font with a width axis you can slightly modify the width to adjust to the space available, and do so in a way that the font was designed to do, rather than using things like letter spacing which doesn’t consider the kerning of the characters. Variable Fonts, JavaScript and Interactive Effects We can take these concepts even further and mix in a little JavaScript to make use of a whole suite of different interactions, events, sensors and apis. The best part about this is whether you are using device orientation, light sensors, viewport resizes, scroll events or mouse movement, the base JavaScript doesn’t really change. To demonstrate this, we’ll use a straightforward example – we’ll match our font weight to the size of our viewport – as the viewport gets smaller, the font weight gets heavier. Demo: As the viewport width changes, the weight of the text “Jello” becomes heavier. We’ll start off by setting our base values. We need to define the minimum and maximum axis values for the font weight, and the minimum and maximum event range, in this case the viewport size. Basically we’re defining the start and end points for both the font and the event. // Font weight axis range const minAxisValue = 200 const maxAxisValue = 900 // Viewport range const minEventValue = 320px const maxEventValue = 1440px Next we determine the current viewport width, which we can access with something like window.innerWidth. // Current viewport width const windowWidth = window.innerWidth Using the current viewport width value, we create the new scale for the viewport, so rather than the pixels values we convert it to a range of 0 - 0.99. const windowSize = (windowWidth - minEventValue) / (maxEventValue - minEventValue) // Outputs a value from 0 - 0.99 We then take that new viewport decimal value and use it to determine the font weight based on viewport scale. const fontWeight = windowSize * (minAxisValue - maxAxisValue) + maxAxisValue; // Outputs a value from 200 - 900 including decimal places This final value is what we use to update our CSS. You can do this however you want – lately I like to use CSS Custom Properties. This will pass the newly calculated font weight value into our CSS and update the weight as needed. // JavaScript p.style.setProperty("--weight", fontWeight); Finally, we can put all this inside a function and inside an event listener for window resize. You can modify this however you need to in order to improve performance, but in essence, this is all you need to achieve the desired outcome. function fluidAxisVariation() { // Current viewport width const windowWidth = window.innerWidth // Get new scales for viewport and font weight const viewportScale = (windowWidth - 320) / (1440 - 320); const fontWeightScale = viewportScale * (200 - 900) + 900; // Set in CSS using CSS Custom Property p.style.setProperty("--weight", fontWeightScale); } window.addEventListener("resize", fluidAxisVariation); You can apply this to single elements, or multiple. In this case, I’m changing the paragraph font weights and different rates, but also reducing the width axis of the headline so it doesn’t wrap onto multiple lines. As previously mentioned, this code can be used to create all sorts of really amazing, interesting effects. All that’s required is passing in different event and axis values. In the following example, I’m using mouse position events to change the direction and rotation of the stretchy slinky effect provided by the font “Whoa” by Scribble Tone. See the Pen Slinky Text - WHOA Variable font demo by Mandy Michael (@mandymichael) on CodePen. We can also take the dark mode/colour schemes idea further by making use of the Ambient Light Sensor to modify the font to be more legible and readable in low light environments. This effect uses Tiny by Jack Halten Fahnestock from Velvetyne Type Foundry and demonstrates how we modify our text based by query the characteristics of the user’s display or light-level, sound or other sensors. It’s only because Variable fonts give us more control over each of these elements that we can fine-tune the font characteristics to maximise the legibility, readability and overall accessibility of our website text. And while these examples might seem trivial, they are great demonstrations of the possibilities. This is a level of control over our fonts and text that is unprecedented. Using device orientation to change the scale and weight of individual characters. View on Codepen. Variable Fonts offer a new world of interactivity, usability and accessibility, but they are still a new technology. This means we have the opportunity to figure out how and what we can achieve with them. From where I stand, the possibilities are endless, so don’t be limited by what we can already do – the web is still young and there is so much for us to create. Variable fonts open up doors that never existed before and they give us an opportunity to think more creatively about how we can create better experiences for our users. At the very least, we can improve the performance of our websites, but at best, we can make more usable, more accessible, and more meaningful content - and that, is what gets me really excited about the future of web typography with variable fonts. About the author Mandy is a community organiser, speaker, and developer working as the Front End Development Manager at Seven West Media in Western Australia. She is a co-organiser and Director of Mixin Conf, and the founder and co-organiser of Fenders, a local meetup for front-end developers providing events, mentoring and support to the Perth web community. Mandy’s passion is CSS, HTML and JS and hopes to inspire that passion in others. She loves the supportive and collaborative nature of the web and strives to encourage this environment through the community groups she is a part of. Her aim is to create a community of web developers who can share, mentor, learn and grow together. More articles by Mandy Full Article Code Design typography
bl It All Starts with a Humble <textarea> By 24ways.org Published On :: Sun, 08 Dec 2019 12:00:00 +0000 Andy Bell rings out a fresh call in support of the timeless concept of progressive enhancement. What does it mean to build a modern JavaScript-focussed web experience that still works well if part of the stack isn’t supported or fails? Andy shows us how that might be done. Those that know me well know that I make a lot of side projects. I most definitely make too many, but there’s one really useful thing about making lots of side projects: it allows me to experiment in a low-risk setting. Side projects also allow me to accidentally create a context where I can demonstrate a really affective, long-running methodology for building on the web: progressive enhancement. That context is a little Progressive Web App that I’m tinkering with called Jotter. It’s incredibly simple, but under the hood, there’s a really solid experience built on top of a minimum viable experience which after reading this article, you’ll hopefully apply this methodology to your own work. What is a minimum viable experience? The key to progressive enhancement is distilling the user experience to its lowest possible technical solution and then building on it to improve the user experience. In the context of Jotter, that is a humble <textarea> element. That humble <textarea> is our minimum viable experience. Let me show you how it’s built up, progressively real quick. If you disable CSS and JavaScript, you get this: This result is great because I know that regardless of what happens, the user can do what they needed to do when the loaded Jotter in their browser: take some notes. That’s our minimum viable experience, completed with a few lines of code that work in every single browser—even very old browsers. Don’t you just love good ol’ HTML? Now it’s time to enhance that minimum viable experience, progressively. It’s a good idea to do that in smaller steps rather than just provide a 0% experience or a 100% experience, which is the approach that’s often favoured by JavaScript framework enthusiasts. I think that process is counter-intuitive to the web, though, so building up from a minimum viable experience is the optimal way to go, in my opinion. Understanding how a minimum viable experience works can be a bit tough, admittedly, so I like to use a the following diagram to explain the process: Let me break down this diagram for both folks who can and can’t see it. On the top row, there’s four stages of a broken-up car, starting with just a wheel, all the way up to a fully functioning car. The car enhances only in a way that it is still mostly useless until it gets to its final form when the person is finally happy. On the second row, instead of building a car, we start with a skateboard which immediately does the job of getting the person from point A to point B. This enhances to a Micro Scooter and then to a Push Bike. Its final form is a fancy looking Motor Scooter. I choose that instead of a car deliberately because generally, when you progressively enhance a project, it turns out to be way simpler and lighter than a project that was built without progressive enhancement in mind. Now that we know what a minimum viable experience is and how it works, let’s apply this methodology to Jotter! Add some CSS The first enhancement is CSS. Jotter has a very simple design, which is mostly a full height <textarea> with a little sidebar. A flexbox-based, auto-stacking layout, inspired by a layout called The Sidebar is used and we’re good to go. Based on the diagram from earlier, we can comfortably say we’re in Skateboard territory now. Add some JavaScript We’ve got styles now, so let’s enhance the experience again. A user can currently load up the site and take notes. If the CSS loads, it’ll be a more pleasant experience, but if they refresh their browser, they’re going to lose all of their work. We can fix that by adding some local storage into the mix. The functionality flow is pretty straightforward. As a user inputs content, the JavaScript listens to an input event and pushes the content of the <textarea> into localStorage. If we then set that localStorage data to populate the <textarea> on load, that user’s experience is suddenly enhanced because they can’t lose their work by accidentally refreshing. The JavaScript is incredibly light, too: const textArea = document.querySelector('textarea'); const storageKey = 'text'; const init = () => { textArea.value = localStorage.getItem(storageKey); textArea.addEventListener('input', () => { localStorage.setItem(storageKey, textArea.value); }); } init(); In around 13 lines of code (which you can see a working demo here), we’ve been able to enhance the user’s experience considerably, and if we think back to our diagram from earlier, we are very much in Micro Scooter territory now. Making it a PWA We’re in really good shape now, so let’s turn Jotter into a Motor Scooter and make this thing work offline as an installable Progressive Web App (PWA). Making a PWA is really achievable and Google have even produced a handy checklist to help you get going. You can also get guidance from a Lighthouse audit. For this little app, all we need is a manifest and a Service Worker to cache assets and serve them offline for us if needed. The Service Worker is actually pretty slim, so here it is in its entirety: const VERSION = '0.1.3'; const CACHE_KEYS = { MAIN: `main-${VERSION}` }; // URLS that we want to be cached when the worker is installed const PRE_CACHE_URLS = ['/', '/css/global.css', '/js/app.js', '/js/components/content.js']; /** * Takes an array of strings and puts them in a named cache store * * @param {String} cacheName * @param {Array} items=[] */ const addItemsToCache = function(cacheName, items = []) { caches.open(cacheName).then(cache => cache.addAll(items)); }; self.addEventListener('install', evt => { self.skipWaiting(); addItemsToCache(CACHE_KEYS.MAIN, PRE_CACHE_URLS); }); self.addEventListener('activate', evt => { // Look for any old caches that don't match our set and clear them out evt.waitUntil( caches .keys() .then(cacheNames => { return cacheNames.filter(item => !Object.values(CACHE_KEYS).includes(item)); }) .then(itemsToDelete => { return Promise.all( itemsToDelete.map(item => { return caches.delete(item); }) ); }) .then(() => self.clients.claim()) ); }); self.addEventListener('fetch', evt => { evt.respondWith( caches.match(evt.request).then(cachedResponse => { // Item found in cache so return if (cachedResponse) { return cachedResponse; } // Nothing found so load up the request from the network return caches.open(CACHE_KEYS.MAIN).then(cache => { return fetch(evt.request) .then(response => { // Put the new response in cache and return it return cache.put(evt.request, response.clone()).then(() => { return response; }); }) .catch(ex => { return; }); }); }) ); }); What the Service Worker does here is pre-cache our core assets that we define in PRE_CACHE_URLS. Then, for each fetch event which is called per request, it’ll try to fulfil the request from cache first. If it can’t do that, it’ll load the remote request for us. With this setup, we achieve two things: We get offline support because we stick our critical assets in cache immediately so they will be accessible offline Once those critical assets and any other requested assets are cached, the app will run faster by default Importantly now, because we have a manifest, some shortcut icons and a Service Worker that gives us offline support, we have a fully installable PWA! Wrapping up I hope with this simplified example you can see how approaching web design and development with a progressive enhancement approach, everyone gets an acceptable experience instead of those who are lucky enough to get every aspect of the page at the right time. Jotter is very much live and in the process of being enhanced further, which you can see on its little in-app roadmap, so go ahead and play around with it. Before you know it, it’ll be a car itself, but remember: it’ll always start as a humble little <textarea>. About the author Andy Bell is an independent designer and front-end developer who’s trying to make everyone’s experience on the web better with a focus on progressive enhancement and accessibility. More articles by Andy Full Article UX craft
bl Flexible Captioned Slanted Images By 24ways.org Published On :: Sat, 21 Dec 2019 12:00:00 +0000 Eric Meyer gift wraps the most awkwardly shaped of boxes using nothing but CSS, HTML and a little curl of ribbon. No matter how well you plan and how much paper you have at your disposal, sometimes you just need to slant the gift to the side. We have a lot of new layout tools at our disposal these days—flexbox is finally stable and interoperable, and Grid very much the same, with both technologies having well over 90% support coverage. In that light, we might think there’s no place for old tricks like negative margins, but I recently discovered otherwise. Over at An Event Apart, we’ve been updating some of our landing pages, and our designer thought it would be interesting to have slanted images of speakers at the tops of pages. The end result looks like this. The interesting part is the images. I wanted to set up a structure like the following, so that it will be easy to change speakers from time to time while preserving accessible content structures: <div id="page-top"> <ul class="monoliths"> <li> <a href="https://aneventapart.com/speakers/rachel-andrew"> <img src="/img/rachel-andrew.jpg" alt=""> <div> <strong>Rachel Andrew</strong> CSS Grid </div> </a> </li> <li> <a href="https://aneventapart.com/speakers/derek-featherstone"> <img src="/img/derek-featherstone.jpg" alt=""> <div> <strong>Derek Featherstone</strong> Accessibility </div> </a> </li> <li> … </li> <li> … </li> </ul> </div> The id value for the div is straightforward enough, and I called the ul element monoliths because it reminded me of the memorial monoliths at the entrance to EPCOT in Florida. I’m also taking advantage of the now-ubiquitous ability to wrap multiple elements, including block elements, in a hyperlink. That way I can shove the image and text structures in there, and make the entire image and text below it one link. Structure is easy, though. Can we make that layout fully responsive? I wondered. Yes we can. Here’s the target layout, stripped of the navbar and promo copy. So let’s start from the beginning. The div gets some color and text styling, and the monoliths list is set to flex. The images are in a single line, after all, and I want them to be flexible for responsive reasons, so flexbox is 100% the right tool for this particular job. #page-top { background: #000; color: #FFF; line-height: 1; } #page-top .monoliths { display: flex; padding-bottom: 1em; overflow: hidden; } I also figured, let’s give the images a simple basis for sizing, and set up the hyperlink while we’re at it. #page-top .monoliths li { width: 25%; } #page-top .monoliths a { color: inherit; text-decoration: inherit; display: block; padding: 1px; } So now the list items are 25% wide—I can say that because I know there will be four of them—and the links pick up the foreground color from their parent element. They’re also set to generate a block box. At this point, I could concentrate on the images. They need to be as wide as their parent element, but no wider, and also match height. While I was at it, I figured I’d create a little bit of space above and below the captioning text, and make the strong elements containing speakers’ names generate a block box. #page-top .monoliths img { display: block; height: 33rem; width: 100%; } #page-top .monoliths div { padding: 0.5em 0; } #page-top .monoliths strong { display: block; font-weight: 900; } It looks like the speakers were all cast into the Phantom Zone or something, so that needs to be fixed. I can’t physically crop the images to be the “correct” size, because there is no correct size: this needs to work across all screen widths. So rather than try to swap carefully-sized images in and out at various breakpoints, or complicate the structure with a wrapper element set to suppress overflow of resized images, I turned to object-fit. #page-top .monoliths img { display: block; height: 33rem; width: 100%; object-fit: cover; object-position: 50% 20%; } If you’ve never used object-fit, it’s a bit like background-size. You can use it to resize image content within the image’s element box without creating distortions. Here, I set the fit sizing to cover, which means all of the img element’s element box will be covered by image content. In this case, it’s like zooming in on the image content. I also set a zooming origin with object-position, figuring that 50% across and 20% down would be in the vicinity of a speaker’s face, given the way pictures of people are usually taken. This is fairly presentable as-is—a little basic, perhaps, but it would be fine to layer the navbar and promo copy back over it with Grid or whatever, and call it a day. But it’s too square and boxy. We must go further! To make that happen, I’m going to take out the third and fourth images temporarily, so we can see more clearly how the next part works. That will leave us with Rachel and Derek. The idea here is to clip the images to be slanted, and then pull them close to each other so they have just a little space between them. The first part is managed with clip-path, but we don’t want to pull the images together unless their shapes are being clipped. So we set up a feature query. @supports (clip-path: polygon(0 0)) or (-webkit-clip-path: polygon(0 0)) { #page-top .monoliths li { width: 37.5%; } } I decided to test for both the un-prefixed and WebKit-prefixed versions of clip-path because Safari still requires the prefix, and I couldn’t think of a good reason to penalize Safari’s users for the slowness of its standards advancement. Then I made the images wider, taking them from 25% to 37.5%, which makes them half again as wide. Thanks to object fitting, the images don’t distort when I change their parent’s width; they just get wider and scale up the contents to fit. And now, it is time for clipping! @supports (clip-path: polygon(0 0)) or (-webkit-clip-path: polygon(0 0)) { #page-top .monoliths li { width: 37.5%; -webkit-clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); } } Each coordinate pair in the polygon() is like the position pairs in background-position or object-position: the horizontal distance first, followed by the vertical distance. So the first point in the polygon is 25% 0, which is 25% of the way across the element box, and no distance down, so right at the top edge. 100% 0 is the top right corner. 75% 100% is on the bottom edge, three-quarters of the way across the element, and 0 100% is the bottom left corner. That creates a polygon that’s a strip three-quarters the full width of the element box, and runs from bottom left to top right. Now we just have to pull them together, and this is where old tricks come back into play: all we need is a negative right margin to bring them closer together. #page-top .monoliths li { width: 37.5%; margin-right: -7.5%; -webkit-clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); } The separation between them is a little wider than we were originally aiming for, but let’s see what happens when we add the other two images back in and let flexbox do its resizing magic. Your browser doesn’t support HTML5 video. Here is a link to the video instead. Notice how the slants actually change shape as the screen gets narrower or wider. This is because they’re still three-quarters the width of the image element’s box, but the width of that box is changing as the screen width changes. That means at narrow widths, the slant is much steeper, whereas at wide widths, the slant is more shallow. But since the clipping path’s coordinates were all set with percentage distances, they all stay parallel to each other while being completely responsive to changes in screen size. An absolute measure like pixels would have failed. But how did the images get closer together just by adding in two more? Because the list items’ basic sizing added up to more than 100%, and they’re all set to flex-shrink: 1. No, you didn’t miss a line in the CSS: 1 is the default value for flex-shrink. Flex items will shrink by default, which after all is what we should expect from a flexible element. If you want to know how much they shrunk, and why, here’s what Firefox’s flex inspector reports. When there were only two list items, there was space enough for both to be at their base size, with no shrinkage. Once we went to four list items, there wasn’t enough space, so they all shrank down. At that point, having a negative right margin of -7.5% was just right to pull them together to act as a unit. So, now they’re all nicely nestled together, and fully responsive! The captions need a little work, though. Notice how they’re clipped off a bit on the left edge, and can be very much clipped off on the right side at narrower screen widths? This happens because the li elements are being clipped, and that clipping applies to all their contents, images and text alike. And we can’t use overflow to alter this: clipped is clipped, not overflowed. Fortunately, all we really need to do is push the text over a small amount. Inside the feature query, I added: #page-top .monoliths div { padding-left: 2%; padding-right: 26%; } This shifts the text just a bit rightward, enough to clear the clip path. On the right side, I padded the div boxes so their contents wouldn’t fall outside the clipped area and appear to slide under the next caption. We could also use margins here, but I didn’t for reasons I’ll make clear at the end. At the last minute, I decided to make the text at least appear to follow the slants of the images. For that, I just needed to shift the first line over a bit, which I did with a bit more padding. #page-top .monoliths strong { padding-left: 1%; } That’s all to the good, but you may have noticed the captions still overlap at really narrow screen widths. There are a lot of options here, from stacking the images atop one another to reverting to normal flow, but I decided to just hide the captions if things got too narrow. It reduces clutter without sacrificing too much in the way of content, and by leaving them still technically visible, they seem to remain accessible. @media (max-width: 35rem) { #page-top .monoliths div { opacity: 0.01 } } And that, as they say, is that! Fully responsive slanted images with text, in an accessible markup structure. I dig it. I did fiddle around with the separations a bit, and found that a nice thin separator occurred around margin-right: -8%, whereas beefier ones could be found above -7%. And if you crank the negative margin value to something beyond -8%, you’ll make the images overlap entirely, no visible separation—which can be a useful effect in its own right. I promised to say why I used padding for the caption text div rather than margins. Here’s why. #page-top .monoliths div { padding-left: 3%; padding-right: 26%; border-top: 2px solid transparent; background: linear-gradient(100deg,hsl(292deg,50%,50%) 50%, transparent 85%); background-clip: padding-box; } It required a wee bit more padding on the left to look decent, and an alteration to the background clipping box in order to keep the purple from filling the transparent border area, but the end result is pretty nifty, if I do say so myself. Alternatively, we could drop the background gradient on the captions and put one in the background, with a result like this. I have no doubt this technique could be extended, made more powerful, and generally improved upon. I really wished for subgrid support in Chrome, so that I could put everything on a grid without having to tear the markup structure apart, and there are doubtless even more interesting clipping paths and layout patterns to try out. I hope these few ideas spark some much better ideas in you, and that you’ll share them with us! About the author Eric A. Meyer (@meyerweb) has been a burger flipper, a college webmaster, an early blogger, one of the original CSS Samurai, a member of the CSS Working Group, a consultant and trainer, and a Standards Evangelist for Netscape. Among other things, Eric co-wrote Design For Real Life with Sara Wachter-Boettcher for A Book Apart and CSS: The Definitive Guide with Estelle Weyl for O’Reilly, created the first official W3C test suite, assisted in the creation of microformats, and co-founded An Event Apart with Jeffrey Zeldman. Eric lives with his family in Cleveland, Ohio, which is a much nicer city than you’ve probably heard. He enjoys a good meal whenever he can and considers almost every form of music to be worthwhile. More articles by Eric Full Article Design css
bl In love with the blue rug By www.thehindu.com Published On :: Wed, 10 Aug 2016 16:53:38 +0530 Flaunting an enviable collection of exclusive editions of denims, L. Murali Krishnan is a true-blue denim lover and a die hard fashionista Full Article Fashion
bl It’s blooming fashion By www.thehindu.com Published On :: Fri, 12 Aug 2016 16:39:13 +0530 Floral prints are back. Designers and stylists tell RANJANI RAJENDRA how to choose well, without ending up looking like a bit of a garden Full Article Fashion
bl Making Mithila fashionable By www.thehindu.com Published On :: Thu, 18 Aug 2016 00:56:30 +0530 Relationship between Ram and Sita, which has been depicted in traditional Mithila paintings, now finds reflection in designer outfits created by Monica and Karishma Full Article Metroplus
bl Art that’s wearable! By www.thehindu.com Published On :: Wed, 07 Sep 2016 17:32:52 +0530 Malabar Gold and Diamonds brings to town a wide range of exquisite handcrafted jewellery Full Article Events
bl Making headway, fashionably By www.thehindu.com Published On :: Mon, 17 Oct 2016 19:00:49 +0530 Full Article Fashion
bl Where subtlety is the new bling By www.thehindu.com Published On :: Thu, 03 Nov 2016 16:39:10 +0530 Shantanu and Nikhil speak of their 16-year-journey and why they like to keep their style subtle Full Article Metroplus
bl Onam weaves for 2022 comes alive with blooms and Kerala-themed motifs By www.thehindu.com Published On :: Sat, 03 Sep 2022 11:43:32 +0530 Designers dress up the traditional cream-and-gold Kerala cotton with hand-painted motifs, embroidery, cut work and more Full Article Fashion
bl Mahila Praharis of the BSF Camel Contingent will make their Republic Day parade debut in uniform designed by Raghavendra Rathore By www.thehindu.com Published On :: Fri, 20 Jan 2023 20:28:00 +0530 The designer also incorporated various skills from across the country and it took him three months to complete the uniform Full Article Life & Style
bl Montblanc and Ferrari’s new pen is inspired by the carmaker’s iconic Daytona SP3 By www.thehindu.com Published On :: Mon, 20 Feb 2023 18:50:49 +0530 Montblanc has reimagined the limited edition fountain pen Montblanc Ferrari Stilema SP3 LE 599’s ink-filling mechanism behind a semi-translucent red blade Full Article Life & Style
bl Public sector – Saab Chalta Hai! By www.thehindubusinessline.com Published On :: Tue, 25 Jun 2013 15:50:18 +0530 Full Article Richa Mishra
bl Editorial. Flexible norms will make rights issues attractive By www.thehindubusinessline.com Published On :: Tue, 27 Aug 2024 20:38:43 +0530 The current norms are too onerous Full Article Editorial
bl Editorial. Sort out FPO problems before trying to scale up By www.thehindubusinessline.com Published On :: Mon, 09 Sep 2024 21:08:15 +0530 The policy confusion over FPOs needs to be cleared Full Article Editorial
bl Editorial. Edible oil tariffs must balance farmer, consumer needs By www.thehindubusinessline.com Published On :: Sun, 22 Sep 2024 21:16:29 +0530 Curbs on edible oil exports must be relaxed so that farmers have the freedom to capitalise on global market opportunities, just as consumers benefit from cheap imports Full Article Editorial
bl Editorial. BJP’s remarkable show in Haryana; NC wrests J&K By www.thehindubusinessline.com Published On :: Tue, 08 Oct 2024 21:24:17 +0530 BJP wins in Haryana for third successive time Full Article Editorial
bl RBI slams high-cost lending, calls for affordable credit from Microfinance Institutions By www.thehindubusinessline.com Published On :: Thu, 24 Oct 2024 20:18:50 +0530 MFIs should not justify steep rates with access issues, says Jayant Kr Dash, Executive Director; Senior RBI official suggests Blended Finance could hold some answer for this issue Full Article Money & Banking
bl YES Bank Q2 Results: PAT more than doubles on stable income; CEO says can be ‘right time’ to acquire MFI By www.thehindubusinessline.com Published On :: Sat, 26 Oct 2024 19:58:23 +0530 YES Bank targets 17-18% deposit growth, loan growth of 13-14% in FY25; CEO Prashant Kumar says this can be the ‘right time’ to acquire an MFI Full Article Money & Banking
bl bl interview. After recognising MFI pain, profitability to improve in H2FY25: IDFC First Bank MD By www.thehindubusinessline.com Published On :: Tue, 29 Oct 2024 10:48:34 +0530 Deposit to continue growing faster than credit in H2FY25 Full Article Money & Banking
bl UPI transactions could double to 1 billion per day in the next few months: RBI Guv Das By www.thehindubusinessline.com Published On :: Tue, 29 Oct 2024 13:17:29 +0530 RBI is in no great hurry to immediately announce a nationwide rollout of the central bank digital currency (CBDC) Full Article Money & Banking
bl Pieces of a Dream : A Story of Gambling / directed by: Michelle Wong ; produced by: Bonnie Thompson, Jerry Krepakevich, Graydon McCrea ; production agency: National Film Board of Canada (Montreal) By darius.uleth.ca Published On :: Montreal : National Film Board of Canada, 2019 Full Article
bl Atchannaidu presents ₹43,403 crore Agriculture Budget in A.P. Legislative Assembly By www.thehindu.com Published On :: Mon, 11 Nov 2024 19:37:50 +0530 Of the total outlay, ₹14,638 crore is for maintenance of irrigation projects; free power scheme gets ₹7,241 crore and ‘Annadata Sukhibhava - PM Kisan’, a Super Six scheme, is allocated ₹4,500 crore Full Article Andhra Pradesh
bl Need to create awareness on Budget preparation among new MLAs, says Andhra Pradesh Assembly Speaker By www.thehindu.com Published On :: Mon, 11 Nov 2024 20:21:39 +0530 ‘It will equip them to express their opinion and they are also supposed to know the allocations made to 39 departments’ Full Article Andhra Pradesh
bl Andhra Pradesh Legislative Assembly sessions to continue till November 22 By www.thehindu.com Published On :: Tue, 12 Nov 2024 08:00:31 +0530 If former Chief Minister Jagan Mohan Reddy continues to skip the Assembly sessions, law will take its own course, says Speaker Ayyanna Patrudu Full Article Andhra Pradesh
bl Film director Ram Gopal Varma booked for making objectionable comments on A.P. CM Chandrababu Naidu By www.thehindu.com Published On :: Tue, 12 Nov 2024 11:34:33 +0530 Filmmaker Ram Gopal Varma made objectionable comments against Andhra Pradesh CM Chandrababu Naidu and his family members during the promotional activity of his film ‘Vyuham’, a few months ago. Full Article Andhra Pradesh
bl Chief Minister Chandrababu Naidu encourages lawmakers to drive meaningful Assembly debates By www.thehindu.com Published On :: Tue, 12 Nov 2024 15:52:39 +0530 Stressing public accountability, Mr. Naidu urged legislators to address the people’s issues in a responsible manner Full Article Andhra Pradesh
bl Andhra Pradesh government urged to move new Tenancy Bill in Assembly By www.thehindu.com Published On :: Tue, 12 Nov 2024 20:11:25 +0530 Andhra Pradesh Tenant Farmers’ Association proposes 35 amendments to Andhra Pradesh Land Cultivators Rights Act, 2024, including provisions for tenant ryots to receive crop loans based on the scale of finance Full Article Andhra Pradesh
bl The way to solve the ‘Kashmir problem’ By www.thehindu.com Published On :: Fri, 11 Oct 2024 01:55:47 +0530 The people expect the political class to resolve the Kashmir issue through political dialogue and democratic deliberations Full Article Jammu and Kashmir Assembly
bl Jammu and Kashmir Assembly elections: Backing Omar Abdullah’s leadership By www.thehindu.com Published On :: Fri, 11 Oct 2024 02:05:55 +0530 The Lokniti-CSDS survey seeks to understand how leadership and party preference influenced voting decisions. Full Article Jammu and Kashmir Assembly
bl A blueprint for safeguarding children By www.thehindu.com Published On :: Tue, 15 Oct 2024 01:16:00 +0530 A recent Supreme Court ruling reframes the watching and downloading of child porn as a serious crime, rather than an adult indulgence Full Article Comment
bl Food access is about equitable agrifood systems By www.thehindu.com Published On :: Wed, 16 Oct 2024 00:08:00 +0530 Addressing food inequality and ensuring that everyone has access to nutritious food are essential steps Full Article Comment
bl Maharashtra Assembly elections 2024: A mixed assessment By www.thehindu.com Published On :: Mon, 21 Oct 2024 02:50:00 +0530 It is quite clear that voters in Maharashtra are not swayed by either of the two coalitions yet. While a greater share of voters are satisfied rather than dissatisfied with the incumbent government, they expressed concerns about unemployment, inflation, and corruption, which are likely to dominate the electoral discourse Full Article Maharashtra Assembly