out

Sensex, Nifty slump as unabated foreign fund outflows drag markets lower

The BSE Sensex tanked 570.45 points to 80,436.16 in early trade. The NSE Nifty slumped 178.3 points to 24,571.55




out

Markets give up initial gains dragged by sharp fall in Kotak Bank, unabated foreign fund outflows

Equity markets open strong but later decline; HDFC Bank gains, Kotak Mahindra Bank falls, global markets mixed




out

Stock markets close lower on sharp fall in Kotak Bank, unabated foreign fund outflows

The 30-share Sensex declined 73.48 points or 0.09% to settle at 81,151.27




out

Markets fall dragged by Hindustan Unilever; massive foreign fund outflows

Nestle, Bharti Airtel, Bajaj Finserv, ICICI Bank and Maruti were the other big laggards




out

Sensex, Nifty tank nearly 1% amid sharp fall in IndusInd Bank, foreign fund outflows

The BSE Sensex plummeted 662.87 points or 0.83% to settle at 79,402.29. The NSE Nifty tanked 218.60 points or 0.90% to 24,180.80




out

Markets fall in early trade on relentless foreign fund outflows

Equity indices fall due to foreign fund outflows and muted earnings, with Sensex and Nifty declining in early trade




out

Sensex, Nifty decline on unabated foreign fund outflows, selling in IT stocks

Falling for the second day in a row, the BSE Sensex tumbled 553.12 points or 0.69% to settle at 79,389.06. During the day, it slumped 654.25 points or 0.81% to 79,287.93




out

Markets fall in early trade amid unabated foreign fund outflows

The BSE Sensex declined 326.58 points to 78,455.66 in early trade




out

Indu Makkal Katchi youth wing president Omkar Balaji questioned for remarks on Nakkheeran Gopal

The Coimbatore police question IMK youth wing leader for threatening to “chop off editor’s tongue”, sparking legal action and protests




out

Police women under the ‘Police Akka’ initiative, to reach out to schoolgirls in Pudukottai district

Policewomen nominated under this initiative will visit schools and colleges every 15 days to ascertain concerns and grievances of students and render assistance




out

Forest Department free coaching helps tribal youth in Jawadhu Hills to get government jobs




out

Agriculture officials conduct surprise checks at fertiliser outlets in Tiruchi district

63 outlets were checked across various agricultural blocks for illegal hoarding and also to check adherence to maximum retail price; dealers asked to comply with guidelines




out

Tiruchi Corporation to take up survey of areas without storm-water drains

Storm-water drains proposed to be constructed for a length of 52 km in all 65 wards in the city at a cost of ₹32.50 crore under the Corporation’s General Funds for 2024-25




out

Kanguva cannot be released without depositing ₹20 crore: Madras High Court

Justices G. Jayachandran and C.V. Karthikeyan pass the order on an application filed by the Official Assignee of the High Court




out

Retraction: Supramolecular organic nanotubes: how to utilize the inner nanospace and the outer space

Soft Matter, 2024, Advance Article
DOI: 10.1039/D4SM90172J, Retraction
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Naohiro Kameta, Hiroyuki Minamikawa, Mitsutoshi Masuda
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




out

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




out

Couture at a click

Manish Malhotra, the designer behind the country’s first virtual reality fashion show, tells us what made his show special




out

Out of Africa

Old Hollywood glamour, featherwork and Masai-derived patterns — designers Abu Jani and Sandeep Khosla talk to Rosella Stephen about their influences, new label and the business of fashion




out

Stand out in a crowd




out

This bus in Chennai brings fashion to your doorstep with its boutique on wheels

Started by Karthick Gunabalan, Pikbig.com showcases a collection of ethnic and Indo-western clothes for women



  • Life &amp; Style

out

Neeta Lulla on ‘Shaakuntalam’: Samantha Ruth Prabhu’s outfits are simple yet alluring

Designer Neeta Lulla on the fairytale-like silhouettes for Samantha Ruth Prabhu’s mythological romance drama ‘Shaakuntalam’




out

All that jazz about gas!




out

Cool workouts for hot days

Don’t let the summer stop you from exercising




out

Jumpstart: Sweating it out with Yoga

Yoga is often dissed by the younger generation as light, easy, slow exercise. BHUMIKA K. begs to differ after going through a ‘happy yoga’ class




out

Gear up for that fitness routine

Sheela Nambiar stresses on the importance of exercise to change the course of your life.




out

For a water-light workout

We plunge into the pool for aqua zumba and finds it exhausting yet fun.




out

Editorial. Robust outlook

Underlying positives in sub-7 pc Q1 growth




out

Editorial. Expanding controls on sugar industry will stifle output

Trying to substitute the operation of market forces in an industry with micro-management of demand, supply and prices creates uncertainty for entrepreneurs




out

Editorial. Sort out FPO problems before trying to scale up

The policy confusion over FPOs needs to be cleared




out

IIFL Finance grows its gold loan portfolio by ₹2,000 cr about a month after RBI lifted lending ban

IIFL Finance’s gold loan book had shrunk from ₹26,000 crore in early March 2024 to ₹10,000 crore by September 19, 2024



  • Money &amp; Banking

out

LIC Q2FY25 results second quarter standalone net profit declined about 4%

Second quarter standalone net profit declined about 4 per cent year-on-year (y-o-y) to Rs ₹7,621 crore



  • Money &amp; Banking

out

Banks offer to park higher amount with RBI via VRRR route

This is the first time in many months when the bid amount was higher than the notified amount



  • Money &amp; Banking

out

Bevel Up - Drugs, Users and Outreach Nursing / directed by: Nettie Wild ; produced by: Fiona Gold, Juanita Maginley, Betsy Carson, Nettie Wild, Svend-Erik Eriksen, Rina Fraticelli ; production agencies: National Film Board of Canada (Montreal), British Co

Montreal : National Film Board of Canada, 2016




out

Bevel Up : Chapter 5 - Street Youth / directed by: Nettie Wild ; produced by: Julie Huguet, André Picard ; production agencies: British Columbia Centre for Disease Control. Street Nurse Program (Vancouver), National Film Board of Canada (Montreal)

Montreal : National Film Board of Canada, 2019




out

Reflections on Practice : Why Outreach? / directed by: Nettie Wild ; production agencies: National Film Board of Canada (Montreal), British Columbia Centre for Disease Control. Street Nurse Program (Vancouver)

Montreal : National Film Board of Canada, 2019




out

Andhra Pradesh Government presents Budget with an outlay ₹2.94 lakh crore

The fiscal deficit will be around 4.19% of the Gross State Domestic Product (GSDP), whereas the revenue deficit will be around 2.12% of the GSDP; ₹11,855 crore allocated for agriculture and allied sectors




out

Youth from Anantapur invited for We are Together International Prize of Russia

The prize is +awarded annually to citizens and organizations regardless of their country of residence, nationality, gender




out

Good potential for cosmetic, textile, food processing sectors in Andhra Pradesh: South Korean diplomat

South Koreans are familiar with Andhra Pradesh and since Kia Motors is here, more Korean companies may wish to come too, says Sangwoo Lim




out

Food access is about equitable agrifood systems

Addressing food inequality and ensuring that everyone has access to nutritious food are essential steps




out

Carnatic music export: Positive outcomes and areas of concern

The increasing Carnatic music festivals abroad show the growing interest of the NRIs, and a huge financial market for the art form




out

The Gaza war and the Global South’s ‘interventions’

The proverbial Global South seems to be showing a fragmented approach to the crisis




out

Uniform output regulation of nonlinear systems [electronic resource] : a convergent dynamics approach / Alexey Pavlov, Nathan van de Wouw, Henk Nijmeijer

Boston : Birkhäuser, 2006




out

Two Rajasthan youth who cheated Amazon delivery partner of ₹11.45 lakh in Mangaluru arrested




out

Farmers urge MPs to consider alternative route for laying Udupi-Kasaragod Power Transmission line




out

KSRTC seeks permits to operate services on six routes connecting areas on Mangaluru outskirts




out

Values never go out of fashion, says Director General of ICMR

Rajiv Bahl was delivering the 32nd convocation address of MAHE on the last day of convocation.




out

Police arrest six on charges of group assault and attempt to murder a youth in Bantwal taluk




out

University of Southampton Delhi ready for its first intake




out

Schools disaffiliated by CBSE in Delhi continue functioning as usual; students, parents say they don’t know about the derecognition

The students from Classes 1 to 9 may not be directly impacted, those set to appear for their Board examinations may have little choice except to shift to another school in the middle of the year




out

Thousands of aspirants protest outside UPPSC headquarters in Prayagraj over exam format

The police use lathi charge to disperse protesters and the Opposition questions government’s use of force on aspirants