libra

Ascent: Training Insights: DE-HDL Libraries in Allegro X System Capture

Allegro X System Capture offers a complete ecosystem for library development. This post introduces the latest DE-HDL Library Development using System Capture course in which you learn how to create different library objects. As a librarian, you often work with numerous libraries. Your tasks include creating or modifying symbols for libraries. To use Allegro X System Capture to create a library, you can follow the steps in the following flowchart: Let’s go through each step in detail. Setting the CDS_SITE Variable Before you start library development for a new project, set the CDS_SITE system environment variable. This step is required to access libraries and other configuration files. Creating a Project in Allegro X System Capture The next step is to create a project in Allegro X System Capture. Adding a Library to the Project Symbol development consists of creating symbol graphics, electrical data, and properties used by different tools in the PCB design flow. To add a library to a project, first create a library in the Libraries pane of the Project e xplorer. Creating Library Symbols The library development process supports the creation of various types of symbols. Creating a Symbol with Multiple Views You can generate multiple views of the same symbol using the Duplicate command. For example, a discrete symbol, such as a resistor, can have multiple views, as shown in the following image: Creating a Split Symbol For advanced designs, you often need to create library symbols and break them into multiple sections to support the design process. When a symbol shows all the logical pins in the physical package, it is called a single-section or flat symbol. Many large ICs have several pins and the symbols need to fit on a single schematic page. One workaround is to use vector pin names on a symbol to reduce its size, although manufacturers prefer schematics that show each pin. You can divide these high-pin count devices into smaller pieces, where each piece is a separate version of the part. Such parts are referred to as split parts or multi-section symbols. For multi-section symbols, you can create two types of split parts—symmetrical and asymmetrical. Symmetrical Split Symbols A symmetrical split symbol has only one symbol graphic, which holds two or more identical logic symbols, each with its own unique physical pin numbers. You can create a symmetrical split symbol using the Duplicate Section icon in the canvas window. Each symbol section contains the same set of pins but different pin numbers, as shown in the following image: Asymmetrical Split Symbols An asymmetrical split symbol is a symbol whose physical package contains one or more unique schematic symbols. You can create an asymmetrical split symbol by clicking the New Section icon in the canvas window. Asymmetrical symbols have a unique set of logical pins, as shown in the following image: Creating Symbols Using the Spreadsheet Interface To simplify the development of large symbols, Allegro X System Capture has a Spreadsheet Interface . You can copy from a spreadsheet into the interface. This saves time and helps minimize errors introduced by manual entry. In conclusion, the DE-HDL library development using Allegro X System Capture course involves several critical steps and supports various symbol creation techniques. This course helps librarians create and modify symbols effortlessly and deepens their understanding of library development within Allegro X System Capture. To learn more about this topic, enroll in the DE-HDL Library Development using Allegro X System Capture course on the Cadence Support portal . Click the training byte link now or visit Cadence Support and search for training bytes under Video Library. If you find the post useful and want to delve deeper into training details, enroll in the following online training course for lab instructions and a downloadable design: DE-HDL Library Development using Allegro X System Capture (Online). You can become Cadence Certified once you complete the course. Cadence Training Services now offers free Digital Badges for all popular online training courses. These badges indicate proficiency in a certain technology or skill and give you a way to validate your expertise to managers and potential employers. You can add the digital badge to your email signature or any social media channels, such as Facebook or LinkedIn, to highlight your expertise. To find out more, see the blog post Take a Cadence Masterclass and Get a Badge . You might also be interested in the training Learning Map that guides you through recommended course flows as well as tool experience and knowledge-level training modules. To find information on how to get an account on the Cadence Learning and Support portal, see here . SUBSCRIBE to the Cadence training newsletter to be updated about upcoming training, webinars, and much more. If you have any questions about courses, schedules, online training, blended/virtual live training, or public, or onsite live training, reach out to us at Cadence Training .




libra

The default location of orCAD Capture library Pin Number is incorrect

The default position of the pin number is incorrect.




libra

Author and library name in sheet border

Dear community

We would like to have more minimalistic and customized sheet borders for our schematics. I used this guide to create a starting point. Essentially, I made a copy of the US_8ths library and modified the Title symbol to look something like that:

Problem 1

The variable ilInst~>libName points to the library of the sheet border symbols, not to the library of the schematic. How do I need to modify this field in order to see the library name of the schematic where the border is instantiated?

Problem 2

The function CCSgetCreator() was taken from here. This solution does not seem to work with our management toll (we use VersIC); the function always returns nil as value. What is the simplest way to display the name of the user that created the schematic? A custom field that could be filled manually would also do the job for us; it doesn't need to be something that automatically fetches data from a database system.

Thanks for any input.




libra

How to use PSpice library in Virtuoso/Spectre?

I want to use PSpice model (download from TI) in Virtuoso , but it can not work. Please help me to check the error message, Thanks

ADE-> Setup-> simulation files->Pspice  Files  /TPS628502-Q1_TRANS.LIB

Parse error before token ']' in expression '[[STEADY_STATE]*0.6]'. If '[[STEADY_STATE]*0.6]'  is a spice expression, quotes are required for the expression.

ERROR(SFE-46): An instance of 'TPS628502-Q1_TRANS'  can have at most 8 terminals (but has 9).

*****************************************************************************
.SUBCKT TPS628502-Q1_TRANS COMP_FSET EN FB GND PG SW SYNC_MODE VIN
+ PARAMS: STEADY_STATE=0
V_U9_V45 U9_N16725824 0 5
E_U9_ABM22 U9_N16725392 0 VALUE { V(FREQ)*1e-12 }
X_U9_U161 U9_N16849713 U9_N16846056 one_shot PARAMS: T=20




libra

Cisco's utilities library donation

Dear users,
Cisco has graciously agreed to donate a library of several utilities packages to the e community. Please refer to the LIBRARY_README.txt for general information, and to each of the packages' PACKAGE_README.txt file for more information on each package. The tar file containing the utilities library is attached to this message.

The zip file containing informational slides on Cisco's utility library packages is also attached. The zip file is 9 mg so may take a bit to download.  The file is too big to fit on this post, so the unzipped files are posted in three separate entries below.

For your convenience, we have also extracted the document “Directory Structure.doc” from the csco_base_env/docs location.
 
Note: The library contains the csco_testflow package, adding phases to e's run phase. Cadence strongly encourages Customers to adopt the testflow phases feature that Cadence is releasing in Specman6.2. The new phases in e will be similar to the phases defined in the csco_testflow package, but will be a formal part of the e language. For more information please contact IPCM@cadence.com.


Originally posted in cdnusers.org by meirav




libra

Stock your digital library ahead of Black Friday with these Kindle book deals

Black Friday is still weeks away but early deals are rolling in. Kindle Book Deals are especially hot with e-books as low as $1.99.




libra

How the NY Public Library acquired a ‘treasure trove’ of Jewish and Yiddish music


Netsky said he thinks the Yiddish theater music in the archive files is particularly valuable because it was maligned by the classical composers as shund (trash) and neglected.




libra

11757b installation manual calibration user guide

11757b installation manual calibration user guide




libra

Epic images show old mines transformed into a library, lab and museum

Amazing images of an open-air library, underground lab and design museum show the reincarnation of dead mines, captured in a new book, 102 Things to Do With a Hole in the Ground




libra

Cloning of Affibody Libraries for Display Methods

Affibody molecules are small (6-kDa) affinity proteins folded in a three-helical bundle and generated by directed evolution for specific binding to various target molecules. The most advanced affibody molecules are currently tested in the clinic, and data from more than 300 subjects show excellent activity and safety profiles. The generation of affibody molecules against a particular target starts with the generation of an affibody library, which can then be used for panning using multiple methods and selection systems. This protocol describes the molecular cloning of DNA-encoded affibody libraries to a display vector of choice, for either phage, Escherichia coli, or Staphylococcus carnosus display. The DNA library can come from different sources, such as error-prone polymerase chain reaction (PCR), molecular shuffling of mutations from previous selections, or, more commonly, from DNA synthesis using various methods. Restriction enzyme-based subcloning is the most common strategy for affibody libraries of higher diversity (e.g., >107 variants) and is described here.




libra

Libraries recognised for community contributions in annual award ceremony

Shetland Library and the National Library of Scotland have been praised for "providing optimist for the future."




libra

Video game libraries lose legal appeal to emulate physical game collections online

Register of Copyrights sides with industry's "market harm" argument for rereleased games.




libra

Are Libra and Capricorn Compatible? Exploring Their Relationship Dynamic

Libra and Capricorn compatibility blends charm and ambition. Discover how this air-earth duo balances romance and practicality in love, friendship, and relationships.




libra

How Compatible Are Libra and Aquarius? Relationship Insights

Discover the compatibility between Libra and Aquarius in love, friendship, and more. Explore their strengths, challenges, and what makes this zodiac pairing unique.




libra

Abbott's iDesign System Creates 3-D Map of the Eye for Precise, Personalized LASIK Vision Treatment - NASA�s Newest Space Telescope is Calibrated by the Same Technology Used in LASIK

Years ago, NASA�s Hubble Space Telescope launched with an error in the telescope�s mirror, which blurred its images for its first years in orbit. For NASA�s upcoming James Webb Space Telescope that is traveling much farther out in space, there can�t be a mistake. Abbott scientists created a technology to calibrate the mirrors on NASA�s new James Webb Space Telescope, which is now the same technology used in the iDesign System that allows ophthalmologists to map the human eye with great precision for a highly personalized LASIK treatment.




libra

AI Audiobook Narrators in OverDrive and the Issue of Library AI Circulation Policy

OverDrive is the company that provides a lot of digital content to libraries. If you’ve borrowed an ebook or an audiobook in Libby,  or read a magazine in Kanopy, that’s OverDrive. It seems there is some AI weirdness with audiobook narration on OverDrive, and the narrator is only part of the story. On Monday, October 14, librarian Robin Bradford posted on Bluesky that she’d purchased an AI audiobook for her library system and she was … Continue reading AI Audiobook Narrators in OverDrive and the Issue of Library AI Circulation Policy




libra

Links: Public Libraries, Lord of the Rings, & More

Welcome back, everyone! We’re having a string of warmer weather in New England and it’s really harshing my fall vibes. I also keep seeing photos or reels of people I know receiving “boo baskets.” Is anyone else familiar? It’s like an Easter basket, but for Halloween. And I kind of love it? I floated the idea by my partner and I was surprised that they wanted to exchange some. Their reasoning is that we’ve been … Continue reading Links: Public Libraries, Lord of the Rings, & More




libra

HaBO: They Have a Kissing Talk in the Library

This HaBO request is from Katharina, who is hoping to find this romance from 80s: Unfortunately I remember very little, but I’d love to find this book again. It was a slim Regency Romance (could have been Category) with a pastel colored cover (soft yellow/pink). The heroine is the ward of the hero, or he’s a family friend. She gets kissed against her will and flees to his house. They sit in his library and … Continue reading HaBO: They Have a Kissing Talk in the Library



  • Help a Bitch Out

libra

little free libraries should have beer

Today on Toothpaste For Dinner: little free libraries should have beer


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




libra

Daily Horoscope, Nov 05, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Horoscope Today November 05, 2024, Tuesday: Welcome to the stars' symphony on this vibrant November 05, 2024! Today unfolds a tapestry of cosmic energies, inviting each zodiac sign to dance through the day with insight and strength. Whether it's love that's




libra

Daily Horoscope, Nov 06, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Horoscope Today November 06, 2024, Wednesday: Good morning, celestial voyagers! The stars are aligned to gift us a day filled with optimistic energies and new beginnings. Today's horoscope promises enlightening insights and guidance that tune into every facet of your life.




libra

Daily Horoscope, Nov 07, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Horoscope Today November 07, 2024, Thursday: Welcome to November 07, 2024, where celestial energies encourage exploration and self-discovery. Today offers a chance to engage with the world in meaningful ways. Let’s dive into the day’s opportunities. Aries Horoscope (March




libra

Daily Horoscope, Nov 08, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Horoscope Today November 08, 2024, Friday: Today beckons with an energizing vibe that shimmers with possibility, inviting you to explore and embrace the subtleties of life. Set your intentions and let the cosmos guide you. Aries Horoscope (March 21




libra

Daily Horoscope, Nov 09, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Horoscope Today November 09, 2024, Saturday: Welcome to a fresh new day, full of potential and vibrant energy. Today, each zodiac sign will experience unique opportunities and challenges that can shape their paths. Stay curious and open to the wonders that




libra

Daily Horoscope, Nov 10, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Horoscope Today November 10, 2024, Sunday: Welcome to an uplifting day where cosmic energies align to both inspire and challenge us. Embrace the vibrant pulsations of the universe as you navigate life’s delightful mysteries. Aries Horoscope (March 21 -




libra

Daily Horoscope, Nov 11, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Horoscope Today November 11, 2024, Monday: Welcome to a day of discovery and illumination! November 11, 2024, brims with vibrant energy, offering a chance to remake the day in your image. Let the stars guide you through today’s adventures and challenges.




libra

Daily Horoscope, Nov 12, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Daily Horoscope for Today, November 12, 2024: Discover what the stars have in store for Libra to Pisces, with focused insights into love, career, and well-being.




libra

Daily Horoscope, Nov 13, 2024: Libra to Pisces; Astrological Prediction for all Zodiac Signs

Daily Horoscope for Today, November 13, 2024: Discover what the stars have in store for Libra to Pisces, with focused insights into love, career, and well-being.




libra

Seventeenth-century libraries : problems and perspectives [Electronic book] / edited by Robyn Adams, Jacqueline Glomski.

Leiden ; Boston : Brill, [2023]




libra

Effect of equilibration time on the structural gradient in the vertical direction for bicontinuous microemulsions in Winsor-III and -IV systems

Soft Matter, 2024, Advance Article
DOI: 10.1039/D3SM01741A, Paper
Douglas G. Hayes, Brian A. Barth, Sai Venkatesh Pingali
Both equilibration time and the transfer of Winsor-III microemulsion systems from one container to another affect the structure of the bicontinuous phase in the vertical direction.
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




libra

Quantitative analysis of the illegal addition of Atenolol in Panax notoginseng based on NIR–MIR spectral data fusion and calibration transfer

RSC Adv., 2024, 14,12428-12437
DOI: 10.1039/D3RA08183D, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Jie Du, Zhengwei Huang, Chun Li, Ling Jiang
To address the issue of the common illegal addition of Atenolol in Panax notoginseng, we propose an approach that realizes multivariate calibration transfer between different particle sizes based on spectral data fusion.
The content of this RSS Feed (c) The Royal Society of Chemistry




libra

A simple spectrogram model for high-accuracy spectral calibration of VIPA spectrometers

Analyst, 2024, 149,5455-5462
DOI: 10.1039/D4AN00965G, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Hao Zhou, Weixiong Zhao, Weihua Cui, Bingxuan Lv, Bo Fang, Nana Yang, Guangfeng Xiang, Weijun Zhang, Lunhua Deng, Weidong Chen
A simple five-parameters spectrogram model for the VIPA spectrometer frequency calibration is developed, which has the advantages of high accuracy, simple setup and easy-to-solve.
The content of this RSS Feed (c) The Royal Society of Chemistry




libra

Updates to the Google Photos APIs: Picker API launch and Library API changes

The new Picker API enables secure photo selection, while the Library API will focus on managing photos and videos uploaded by your application.




libra

Gemini is now accessible from the OpenAI Library

Developers can now access and build with the latest Gemini models through the OpenAI Library and REST API. Update your code with three lines and get started.




libra

Living Library Event: Celebrating International Education | Nov. 21

Link to Notice




libra

Is Libra really a cryptocurrency? Facebook’s new money, explained | WIRED Explains

On June 18, 2019, Facebook announced its virtual currency Libra. In Facebook’s vision, it should become a global currency for billions of people, especially those in developing countries who have no access to banks or financial services. In other words, Digital money which you can transfer to other people or simply use to buy stuff. But is it a true cryptocurrency and how will the world respond to a currency controlled by a group of mega-corporations? #facebook #libra #crypto




libra

Evaluation and calibration of matrix effects during SIMS silicon isotope analysis in silicate glasses

J. Anal. At. Spectrom., 2024, 39,2832-2840
DOI: 10.1039/D4JA00253A, Paper
Liu-Yang Chen, Yu Liu, Di Zhang, Guo-Qiang Tang, Qiu-Li Li
A matrix effect calibration model during SIMS silicon isotope analysis based on the contents of Si, Ca, Al and Mg (SCAM model) in silicate glasses.
The content of this RSS Feed (c) The Royal Society of Chemistry




libra

Laser-Induced Breakdown Spectroscopy (LIBS): calibration challenges, combination with other techniques, and spectral analysis using data science

J. Anal. At. Spectrom., 2024, Accepted Manuscript
DOI: 10.1039/D4JA00250D, Critical Review
Dennis Ferreira, Diego Victor De Babos, Mauro Henrique Lima-Filho, Heloisa Froehlick Castello, Alejandro C. Olivieri, Fabiola Manhas Verbi Pereira, Edenir Rodrigues Pereira-Filho
Laser-Induced Breakdown Spectroscopy (LIBS) is a versatile and powerful analytical technique widely used for rapid, in-situ elemental analysis across various fields, from industrial quality control to planetary exploration. This review...
The content of this RSS Feed (c) The Royal Society of Chemistry




libra

Ram Mohan Library: A 120-year-old treasure trove of books in Vijayawada

At a time when libraries are losing their sheen owing to a lack of patronage, the century-old Ram Mohan Library in Vijaywada continues to attract book lovers to its vast collection of books and its illustrious history




libra

Library rooted in Gandhian principles turns a boon to book lovers in Andhra Pradesh

Home to over 35,000 books on various subjects, the Sarada Grandhalaya at Anakapalle has been serving society for over eight decades




libra

Library and bus stand at Kodangipalayam remain idle




libra

Modern Library Holdings and Historic City Growth [electronic journal].




libra

KAS African Law Study Library [electronic journal].

Nomos Verlagsgesellschaft mbH & Co. KG




libra

Cyclic peptides targeting the SARS-CoV-2 programmed ribosomal frameshifting RNA from a multiplexed phage display library

Chem. Sci., 2024, Advance Article
DOI: 10.1039/D4SC04026K, Edge Article
Open Access
Jacob A. Iannuzzelli, Rachel Bonn, Andrew S. Hong, Abhijith Saseendran Anitha, Jermaine L. Jenkins, Joseph E. Wedekind, Rudi Fasan
Cyclopeptide agents targeted against the −1 programmed ribosomal frameshifting stimulatory sequence RNA pseudoknot of SARS-CoV-2 were discovered by screening a multiplexed phage display library of genetically encoded peptide macrocycles.
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




libra

Knives Cooks Love Reviewed by Library Journal

Knives Cooks Love: Selection. Care. Techniques. Recipes. by Sur La Table with Sarah Jay is reviewed in the 11/15/08 edition of Library Journal:

Most home cooks tend to be protective of their knives and often claim to be highly knowledgeable of the knife world. This book from Sur La Table and food writer Jay is slightly obsessive; it goes into shocking detail about each type of knife from the few countries that produce the best of the best. There is the obligatory section, "A Blade for Every Purpose," that describes each type of knife and its possible uses, which is the best part of the book. Another helpful portion addresses how to buy a knife, which has comprehensive explanations on such weighty points as blade anatomy and blade material. The lay reader will like the simple sections on how to chop, peel, and dice a variety of foods. The recipes that are included are basic for the most part and slightly uninspiring (e.g., mango-cucumber salsa). Recommended for academic libraries with a large collection of culinary arts materials.—Claire A. Schaper, Morgantown, WV




libra

Consultant to be appointed soon to design Kalaignar grand library in Tiruchi

The centre will offer translation, services for persons with disabilities and children, training and mentorship programmes, besides hosting monthly literary events




libra

Library to hold Group II-A Mains, Group IV TNPSC model test




libra

Art and literary contests lined up for District Central Library’s National Library Week




libra

Beautiful Scrolling Experiences – Without Libraries

Michelle Barker appears as one of a heavenly host, coming forth with scroll in hand to pronounce an end to janky scrolljacking! Unto us a new specification is born, in the city of TimBL, and its name shall be called Scroll Snap.


Sponsor: Order any Standard paperback(s) and get a surprise gift card in the box for YOU. While supplies last, from your pals at A Book Apart!


One area where the web has traditionally lagged behind native platforms is the perceived “slickness” of the app experience. In part, this perception comes from the way the UI responds to user interactions – including the act of scrolling through content.

Faced with the limitations of the web platform, developers frequently reach for JavaScript libraries and frameworks to alter the experience of scrolling a web page – sometimes called “scroll-jacking” – not always a good thing if implemented without due consideration of the user experience. More libraries can also lead to page bloat, and drag down a site’s performance. But with the relatively new CSS Scroll Snap specification, we have the ability to control the scrolling behaviour of a web page (to a degree) using web standards – without resorting to heavy libraries. Let’s take a look at how.

Scroll Snap

A user can control the scroll position of a web page in a number of ways, such as using a mouse, touch gesture or arrow keys. In contrast to a linear scrolling experience, where the rate of scroll reflects the rate of the controller, the Scroll Snap specification enables a web page to snap to specific points as the user scrolls. For this, we need a fixed-height element to act as the scroll container, and the direct children of that element will determine the snap points. To demonstrate this, here is some example HTML, which consists of a <div> containing four <section> elements:

<div class="scroll-container">
  <section>
    <h2>Section 1</h2>
  </section>
  <section>
    <h2>Section 2</h2>
  </section>
  <section>
    <h2>Section 3</h2>
  </section>
  <section>
    <h2>Section 4</h2>
  </section>
</div>

Scroll snapping requires the presence of two main CSS properties: scroll-snap-type and scroll-snap-align. scroll-snap-type applies to the scroll container element, and takes two keyword values. It tells the browser:

  • The direction to snap
  • Whether snapping is mandatory

scroll-snap-align is applied to the child elements – in this case our <section>s.

We also need to set a fixed height on the scroll container, and set the relevant overflow property to scroll.

.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

section {
  height: 100vh;
  scroll-snap-align: center;
}

In the above example, I’m setting the direction in the scroll-snap-type property to y to specify vertical snapping. The second value specifies that snapping is mandatory. This means that when the user stops scrolling their scroll position will always snap to the nearest snap point. The alternative value is proximity, which determines that the user’s scroll position will be snapped only if they stop scrolling in the proximity of a snap point. (It’s down to the browser to determine what it considers to be the proximity threshold.)

If you have content of indeterminate length, which might feasibly be larger than the height of the scroll container (in this case 100vh), then using a value of mandatory can cause some content to be hidden above or below the visible area, so is not recommended. But if you know that your content will always fit within the viewport, then mandatory can produce a more consistent user experience.

See the Pen Simple scroll-snap example by Michelle Barker (@michellebarker) on CodePen.

In this example I’m setting both the scroll container and each of the sections to a height of 100vh, which affects the scroll experience of the entire web page. But scroll snapping can also be implemented on smaller components too. Setting scroll snapping on the x-axis (or inline axis) can produce something like a carousel effect.

In this demo, you can scroll horizontally scroll through the sections:

See the Pen Carousel-style scroll-snap example by Michelle Barker (@michellebarker) on CodePen.

The Intersection Observer API

By implementing the CSS above, our web page already has a more native-like feel to it. To improve upon this further we could add some scroll-based transitions and animations. We’ll need to employ a bit of Javascript for this, using the Intersection Observer API. This allows us to create an observer that watches for elements intersecting with the viewport, triggering a callback function when this occurs. It is more efficient than libraries that rely on continuously listening for scroll events.

We can create an observer that watches for each of our scroll sections coming in and out of view:

const sections = [...document.querySelectorAll('section')]

const options = {
  rootMargin: '0px',
  threshold: 0.25
}

const callback = (entries) => {
  entries.forEach((entry) => {
    if (entry.intersectionRatio >= 0.25) {
      target.classList.add("is-visible");
    } else {
      target.classList.remove("is-visible");
    }
  })
}

const observer = new IntersectionObserver(callback, options)

sections.forEach((section, index) => {
  observer.observe(section)
})

In this example, a callback function is triggered whenever one of our sections intersects the container by 25% (using the threshold option). The callback adds a class of is-visible to the section if it is at least 25% in view when the intersection occurs (which will take effect when the element is coming into view), and removes it otherwise (when the element is moving out of view). Then we can add some CSS to transition in the content for each of those sections:

section .content {
  opacity: 0:
}

section.is-visible .content {
  opacity: 1;
  transition: opacity 1000ms:
}

This demo shows it in action:

See the Pen Scrolling with Intersection Observer by Michelle Barker (@michellebarker) on CodePen.

You could, of course, implement some much more fancy transition and animation effects in CSS or JS!

As an aside, it’s worth pointing out that, in practice, we shouldn’t be setting opacity: 0 as the default without considering the experience if JavaScript fails to load. In this case, the user would see no content at all! There are different ways to handle this: We could add a .no-js class to the body (which we remove on load with JS), and set default styles on it, or we could set the initial style (before transition) with JS instead of CSS.

Position: sticky

There’s one more CSS property that I think has the potential to aid the scroll experience, and that’s the position property. Unlike position: fixed, which locks the position of an element relative to the nearest relative ancestor and doesn’t change, position: sticky is more like a temporary lock. An element with a position value of sticky will become fixed only until it reaches the threshold of its parent, at which point it resumes relative positioning.

By “sticking” some elements within scroll sections we can give the impression of them being tied to the action of scrolling between sections. It’s pretty cool that we can instruct an element to respond to it’s position within a container with CSS alone!

Browser support and fallbacks

The scroll-snap-type and scroll-snap-align properties are fairly well-supported. The former requires a prefix for Edge and IE, and older versions of Safari do not support axis values. In newer versions of Safari it works quite well. Intersection Observer similarly has a good level of support, with the exception of IE.

By wrapping our scroll-related code in a feature query we can provide a regular scrolling experience as a fallback for users of older browsers, where accessing the content is most important. Browsers that do not support scroll-snap-type with an axis value would simply scroll as normal.

@supports (scroll-snap-type: y mandatory) {
  .scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
  }

  section {
    height: 100vh;
    scroll-snap-align: center;
  }
}

The above code would exclude MS Edge and IE, as they don’t support axis values. If you wanted to support them you could do so using a vendor prefix, and using @supports (scroll-snap-type: mandatory) instead.

Putting it all together

This demo combines all three of the effects discussed in this article.

Summary

Spending time on scroll-based styling might seem silly or frivolous to some. But I believe it’s an important part of positioning the web as a viable alternative to native applications, keeping it open and accessible. While these new CSS features don’t offer all of the control we might expect with a fully featured JS library, they have a major advantage: simplicity and reliability. By utilising web standards where possible, we can have the best of both worlds: Slick and eye-catching sites that satisfy clients’ expectations, with the added benefit of better performance for users.


About the author

Michelle is a Lead Front End Developer at Bristol web agency Atomic Smash, author of front-end blog CSS { In Real Life }, and a Mozilla Tech Speaker. She has written articles for CSS Tricks, Smashing Magazine, and Web Designer Magazine, to name a few. She enjoys experimenting with new CSS features and helping others learn about them.

More articles by Michelle




libra

New link to Library Reorganization Blog

I've put a link to the new Library Reorganization Blog to our list of links (look on the right hand side). It appears that it is open for comments, whether named or anonymous.