apt

‘Children need laptops to access online classes’

Plea in HC also seeks free Internet




apt

[ASAP] Probing the Mechanism of Structure-Switching Aptamer Assembly by Super-Resolution Localization of Individual DNA Molecules

Analytical Chemistry
DOI: 10.1021/acs.analchem.9b05563




apt

[ASAP] Characterizing and Quantitating Therapeutic Tethered Multimeric Antibody Degradation Using Affinity Capture Mass Spectrometry

Analytical Chemistry
DOI: 10.1021/acs.analchem.9b05739




apt

Watch: Bhogle on why Rohit replacing Kohli as India’s white-ball captain may not be a good idea

Rohit Sharma and Virat Kohli’s contrasting fortune as captains in the Indian Premier League has always raised doubts.




apt

Australian captain Meg Lanning leads online batting class for Ireland women’s cricket team

Lanning was joined by former Ireland skipper Isobel Joyce in the session that also featured the head coaches of both teams Ed Joyce and Matthew Mott.




apt

Flexible Captioned Slanted Images

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.

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




apt

Mayawati has captured Dalit movement, doesn't allow others to rise: Rahul Gandhi

Rahul urged Congress to "systematically" prepare Dalit leadership at every level.




apt

Adaptive food webs : stability and transitions of real and model ecosystems / edited by John C. Moore (Colorado State University, CO, USA), Peter C. de Ruiter (Wageningen Universiteit, The Netherlands), Kevin S. McCann (University of Guelph, ON, Canada),




apt

Building adaptive capacity to climate change : contributions from Australia's Marine Adaptation Network 2009-2013 / [Neil Holbrook]

Holbrook, Neil John, compiler




apt

Carbon capture and storage : efficient legal policies for risk governance and compensation / Michael G. Faure and Roy A. Partain

Faure, Michael (Michael G.), author




apt

Planned for dual-screen devices, Microsoft Windows 10X to debut on laptops

The technology giant will look for the right moment to bring the dual-screen devices to the market, said the company in a statement




apt

Yiddish language structures [electronic resource] / edited by Marion Aptroot and Björn Hansen




apt

Zenoss core 3.x network and system monitoring [electronic resource] : a step-by-step guide to configuring, using, and adapting this free Open Source network monitoring system / Michael Badger

Badger, Michael




apt

Zenoss Core network and system monitoring [electronic resource] : a step-by-step guide to configuring, using, and adapting the free open-source network monitoring system / Michael Badger

Badger, Michael




apt

[ASAP] Highly Ordered Two-Dimensional MoS<sub>2</sub> Archimedean Scroll Bragg Reflectors as Chromatically Adaptive Fibers

Nano Letters
DOI: 10.1021/acs.nanolett.9b05004




apt

Performance indicators for water supply services / Helena Alegre, Jaime Melo Baptista, Enrique Cabrera Jr., Francisco Cubillo, Patrícia Duarte, Wolfram Hirner, Wolf Merkel, Renato Parena

Alegre, Helena, author




apt

Revitalizing urban waterway communities : streams of environmental justice / Richard Smardon, Sharon Moran, and April Karen Baptiste ; with contributions from Blake Neumann and Jill Weiss

Smardon, Richard C., author




apt

John the Baptist in history and theology / Joel Marcus

Marcus, Joel, 1951- author




apt

John the Baptist : prophet of purity for a new age / Catherine M. Murphy

Murphy, Catherine M., 1961- author




apt

The first Christian believer : in search of John the Baptist / Rivka Nir

Nir, Rivḳah, author




apt

New HTML5 elements: summary & figcaption

Over the weekend two new HTML5 elements – summary and figcaption – were added to the draft specification. The introduction of summary and figcaption marks the acceptance that new elements are needed to act as captions or legends for the details and figure elements. The addition of the figcaption element finally begins to clear up the difficulty in marking-up figure element captions and looks to cement the place of the figure element in the HTML5 specification. The summary element does much the same for the details element but the very nature of the details element itself means that its future is not yet clear.

The figcaption element

This new element acts as the optional caption or legend for any content contained within its parent figure element.

If there is no figcaption element within a figure element then there is no caption for the rest of its content. If there is a figcaption element then it must be the first or last child of the figure element and only the first figcaption element (should there be more than one child figcaption of the parent figure element) represents a caption.

The figure element is used to mark up any self-contained content that may be referenced from the main flow of a document but could also be removed from the primary content (for example, to an appendix) without affecting its flow. This makes it suitable for various types of content ranging from graphs and data tables to photographs and code blocks.

<p><a href="#fig-ftse">Figure 1</a> shows the extent of the collapse in the markets and how recovery has been slow.</p>

<figure id="fig-ftse">
  <figcaption>Figure 1. The value of the FTSE 100 Index from 1999&ndash;2009.</figcaption>
  <img src="ftse-100-index-graph.jpg" alt="The index hit a record high at the end of 1999 and experienced two significant drops in the following last decade.">
</figure>

<p>This latest financial crisis hasn't stopped Alex from writing music and his latest track is actually worth listening to.</p>

<figure>
  <audio src="what-am-i-doing.mp3" controls></audio>
  <figcaption><cite>What am I doing?</cite> by Alex Brown</figcaption>
</figure>

The creation of the figcaption element is an important step forward for the HTML5 draft specification as it finally provides a reliable means to markup the caption for content that is best marked up as a figure. Previous attempts to use the legend element, the caption element, and the dt and dd elements had failed due to a lack of backwards compatibility when it came to styling these elements with CSS.

The summary element

This new element represents a summary, caption, or legend for any content contained within its parent details element.

The summary element must be the first child of a details element and if there is no summary element present then the user agent should provide its own. The reason for this is because the details element has a specific function – to markup additional information and allow the user to toggle the visibility of the additional information. Although it is not specified in the specification, it is expected that the summary element will act as the control that toggles the open-closed status of the contents of the parent details element.

<details>
  <summary>Technical details.</summary>
  <dl>
    <dt>Bit rate:</dt> <dd>190KB/s</dd>
    <dt>Filename:</dt> <dd>drum-and-bass-mix.mp3</dd>
    <dt>Duration:</dt> <dd>01:02:34</dd>
    <dt>File size:</dt> <dd>78.9MB</dd>
  </dl>
</details>

The introduction of the summary element seems to secure the future of the details element and the new behaviour that it affords, for now. When user agents begin to add support for the details element you won’t need JavaScript, or even CSS, to have expanding or collapsing sections in an HTML document.

The future of the details element

There will continue to be some debate over the inclusion of behaviour in an HTML specification especially given the widespread use of JavaScript to provide the expand-collapse functionality that details describes.

The details element writes some quite significant behaviour into an HTML document and I can see it being abused to provide generic expand-collapse functionality throughout a document. It is also not entirely clear what purpose the details element actually serves other than being an attempt to bypass the need for JavaScript or CSS to expand or collapse sections of a document.

There has been a general softening of the rough distinction between content, presentation, and behaviour. JavaScript libraries are being used to patch holes in browser CSS and HTML5 support, the CSS3 modules introduce plenty of behaviour that was previously only possibly with JavaScript, and the HTML5 specification is also introducing functionality and behaviour that previously required the use of JavaScript.

The future survival of the details element, and the behaviour associated with it, may well depend on browser implementations and author applications over the coming months.




apt

The Tech Professional's Guide to Communicating in a Global Workplace [electronic resource] : Adapting Across Cultural and Gender Boundaries / by April Wells

Wells, April. author





apt

Water-locking molecule-assisted fabrication of natural-inspired Mg(OH)2 for high-efficient and economical uranium capture

Dalton Trans., 2020, Accepted Manuscript
DOI: 10.1039/D0DT00618A, Paper
Hengbin Xu, Zhenyuan Bai, Milin Zhang, Jun Wang, Yongde Yan, Min Qiu, Jiaming Chen
With the depletion of uranium terrestrial deposits, researchers have focused on the development of adsorbents to extract radioactive uranium from seawater/wastewater. However, there are still considerable challenges to manipulate this...
The content of this RSS Feed (c) The Royal Society of Chemistry




apt

Lessons from the Clean Air Act: building durability and adaptability into US climate and energy policy / edited by Ann Carlson, Dallas Burtraw

Dewey Library - KF3812.L47 2019




apt

Governments are slow to put in place the policies we need for adaptation to climate change

Policies aimed at adaptation will help the world build resilient highways and other infrastructure




apt

Adapting to climate change: How chemistry will help us thrive

Learn how chemists are developing new technologies to protect food and water supplies, save critical ecosystems, and safeguard cities from natural disasters in the face of climate change




apt

Porous ionic liquid captures alcohols and CFCs

Cage-like structures could enable selective separations in continuous-flow systems




apt

45Q, the tax credit that's luring US companies to capture CO&lt;sub&gt;2&lt;/sub&gt;

Cement, ethanol, and ammonia makers are among those looking to convert waste carbon to cash




apt

Video: Designer surface captures pesky bubbles

Textured metal surface could help control foams in industrial processes, like in bioreactors




apt

One-pot process converts CO&lt;sub&gt;2&lt;/sub&gt; captured from the air into methanol

Scientists use an alkali hydroxide–based system to turn carbon dioxide into a carbon-neutral fuel




apt

Amgen and Adaptive pursue COVID-19 antibody therapy




apt

Cummins, U of Minnesota adapt DuPont filter tech to N95 masks




apt

Coastal ecosystems of the tropics -- adaptive management / Velmurugan Ayyam, Swarnam Palanivel, Sivaperuman Chandrakasan

Online Resource




apt

The Oxford handbook of musical theatre screen adaptations / edited by Dominic McHugh

STACK BOOKS PN1995.9.M86 O94 2019




apt

[ASAP] Convenient Construction of Orthogonal Dual Aptamer-Based Plasmonic Immunosandwich Assay for Probing Protein Disease Markers in Complex Samples and Living Animals

ACS Sensors
DOI: 10.1021/acssensors.0c00359




apt

[ASAP] A Fluorescence and Surface-Enhanced Raman Spectroscopic Dual-Modal Aptasensor for Sensitive Detection of Cyanotoxins

ACS Sensors
DOI: 10.1021/acssensors.0c00307




apt

Adapting to teaching and learning in open-plan schools / edited by Vaughan Prain [and more]

Online Resource




apt

Dendritic silver self-assembly in molten-carbonate membranes for efficient carbon dioxide capture

Energy Environ. Sci., 2020, Advance Article
DOI: 10.1039/C9EE03497H, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Liam A. McNeil, Greg A. Mutch, Francesco Iacoviello, Josh J. Bailey, Georgios Triantafyllou, Dragos Neagu, Thomas S. Miller, Evangelos I. Papaioannou, Wenting Hu, Dan J. L. Brett, Paul R. Shearing, Ian S. Metcalfe
Self-assembling Ag dendritic networks provide ultrahigh CO2 permeability, whilst reducing membrane-volume-normalised Ag demand by an order of magnitude.
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




apt

[ASAP] In Situ Cu-Loaded Porous Boron Nitride Nanofiber as an Efficient Adsorbent for CO<sub>2</sub> Capture

ACS Sustainable Chemistry & Engineering
DOI: 10.1021/acssuschemeng.0c01530




apt

Revision of the ascomycete genus amphisphaeria / You Zhi Wang, André Aptroot and Kevin D. Hyde

Wang, You Zhi




apt

Bergaptol from blossoms of Citrus aurantium L. var. amara Engl inhibits LPS-induced inflammatory responses and ox-LDL-induced lipid deposition

Food Funct., 2020, Accepted Manuscript
DOI: 10.1039/C9FO00255C, Paper
Chun-Yan Shen, Tian-Xing Wang, Jian-Guo Jiang, Chun-Ling Huang, Wei Zhu
Aberrant activation of inflammation and excess accumulation of lipids play pivotal roles in atherosclerosis (AS) progression. Constituents from Citrus aurantium Linn variant amara Engl (CAVA) were effectively investigated for their...
The content of this RSS Feed (c) The Royal Society of Chemistry





apt

Corporates adapt to work from home as the new normal

Corporates adapt to work from home as the new normal




apt

The State of the World's Refugees: Adapting Health Responses to Urban Environments

Interview with Paul Spiegel, MD, author of The State of the World's Refugees: Adapting Health Responses to Urban Environments




apt

Enhancing crop genepool use : capturing wild relative and landrace diversity for crop improvement / edited by Nigel Maxted, M. Ehsan Dulloo and Brian V. Ford-Lloyd




apt

Raptor medicine, surgery, and rehabilitation / David E. Scott, DVM (Staff Veterinarian, Carolina Raptor Center, Charlotte, North Carolina, USA)

Scott, David E., 1966- author




apt

Oilseed crops : yield and adaptations under environmental stress / edited by Parvaiz Ahmad (Department of Botany, Sri Pratap College, Jammu and Kashmir, India)




apt

Promoting aviation career education in high schools and community colleges / C. Daniel Prather, DPrather Aviation Solutions, LLC, Riverside, CA and California Baptist University, Riverside, CA

Online Resource




apt

Land, people and power: an anthropological study of emerging mega city of New Town, Rajarhat / Kakali Chakrabarty, Krishna Mandal, Janak Kumari Srivastava, Sudhansu Gangopadhyay, Asok Kumar Mukhopadhyay, Sumitabha Chakrabarty, Rapti Pan, K. M. Sinha Roy

Rotch Library - GN635.I4 C43 2015