cky

How India’s first woman mining engineer cut a rocky path for herself

From braving ‘roof collapses’ to the lack of basic amenities in coal mines designed for men, engineer Akanksha Kumari scripts an inspiring tale of passion and grit




cky

position: sticky, draft 1

I’m writing the position: sticky part of my book, and since I never worked with sticky before I’m not totally sure if what I’m saying is correct.

This is made worse by the fact that there are no very clear tutorials on sticky. That’s partly because it works pretty intuitively in most cases, and partly because the details can be complicated.

So here’s my draft 1 of position: sticky. There will be something wrong with it; please correct me where needed.

The inset properties are top, right, bottom and left. (I already introduced this terminology earlier in the chapter.)

Introduction

position: sticky is a mix of relative and fixed. A sticky box takes its normal position in the flow, as if it had position: relative, but if that position scrolls out of view the sticky box remains in a position defined by its inset properties, as if it has position: fixed. A sticky box never escapes its container, though. If the container start or end scrolls past the sticky box abandons its fixed position and sticks to the top or the bottom of its container.

It is typically used to make sure that headers remain in view no matter how the user scrolls. It is also useful for tables on narrow screens: you can keep headers or the leftmost table cells in view while the user scrolls.

Scroll box and container

A sticky box needs a scroll box: a box that is able to scroll. By default this is the browser window — or, more correctly, the layout viewport — but you can define another scroll box by setting overflow on the desired element. The sticky box takes the first ancestor that could scroll as its scroll box and calculates all its coordinates relative to it.

A sticky box needs at least one inset property. These properties contain vital instructions, and if the sticky box doesn’t receive them it doesn’t know what to do.

A sticky box may also have a container: a regular HTML element that contains the sticky box. The sticky box will never be positioned outside this container, which thus serves as a constraint.

The first example shows this set-up. The sticky <h2> is in a perfectly normal <div>, its container, and that container is in a <section> that is the scroll box because it has overflow: auto. The sticky box has an inset property to provide instructions. The relevant styles are:

section.scroll-container {
	border: 1px solid black;
	width: 300px;
	height: 300px;
	overflow: auto;
	padding: 1em;
}

div.container {
	border: 1px solid black;
	padding: 1em;
}

section.scroll-container h2 {
	position: sticky;
	top: 0;
}

The rules

Sticky header

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

Now let’s see exactly what’s going on.

A sticky box never escapes its containing box. If it cannot obey the rules that follow without escaping from its container, it instead remains at the edge. Scroll down until the container disappears to see this in action.

A sticky box starts in its natural position in the flow, as if it has position: relative. It thus participates in the default flow: if it becomes higher it pushes the paragraphs below it downwards, just like any other regular HTML element. Also, the space it takes in the normal flow is kept open, even if it is currently in fixed position. Scroll down a little bit to see this in action: an empty space is kept open for the header.

A sticky box compares two positions: its natural position in the flow and its fixed position according to its inset properties. It does so in the coordinate frame of its scroll box. That is, any given coordinate such as top: 20px, as well as its default coordinates, is resolved against the content box of the scroll box. (In other words, the scroll box’s padding also constrains the sticky box; it will never move up into that padding.)

A sticky box with top takes the higher value of its top and its natural position in the flow, and positions its top border at that value. Scroll down slowly to see this in action: the sticky box starts at its natural position (let’s call it 20px), which is higher than its defined top (0). Thus it rests at its position in the natural flow. Scrolling up a few pixels doesn’t change this, but once its natural position becomes less than 0, the sticky box switches to a fixed layout and stays at that position.

The sticky box has bottom: 0

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Sticky header

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

It does the same for bottom, but remember that a bottom is calculated relative to the scroll box’s bottom, and not its top. Thus, a larger bottom coordinate means the box is positioned more to the top. Now the sticky box compares its default bottom with the defined bottom and uses the higher value to position its bottom border, just as before.

With left, it uses the higher value of its natural position and to position its left border; with right, it does the same for its right border, bearing in mind once more that a higher right value positions the box more to the left.

If any of these steps would position the sticky box outside its containing box it takes the position that just barely keeps it within its containing box.

Details

Sticky header

Very, very long line of content to stretch up the container quite a bit

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

The four inset properties act independently of one another. For instance the following box will calculate the position of its top and left edge independently. They can be relative or fixed, depending on how the user scrolls.

p.testbox {
	position: sticky;
	top: 0;
	left: 0;
}

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

The sticky box has top: 0; bottom: 0

Regular content

Regular content

Regular content

Regular content

Sticky header

Regular content

Regular content

Regular content

Regular content

Regular content

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

Setting both a top and a bottom, or both a left and a right, gives the sticky box a bandwidth to move in. It will always attempt to obey all the rules described above. So the following box will vary between 0 from the top of the screen to 0 from the bottom, taking its default position in the flow between these two positions.

p.testbox {
	position: sticky;
	top: 0;
	bottom: 0;
}

No container

Regular content

Regular content

Sticky header

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

So far we put the sticky box in a container separate from the scroll box. But that’s not necessary. You can also make the scroll box itself the container if you wish. The sticky element is still positioned with respect to the scroll box (which is now also its container) and everything works fine.

Several containers

Sticky header

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Content outside container

Content outside container

Content outside outer container

Content outside outer container

Or the sticky item can be several containers removed from its scroll box. That’s fine as well; the positions are still calculated relative to the scroll box, and the sticky box will never leave its innermost container.

Changing the scroll box

Sticky header

The container has overflow: auto.

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Content outside container

Content outside container

Content outside container

One feature that catches many people (including me) unaware is giving the container an overflow: auto or hidden. All of a sudden it seems the sticky header doesn’t work any more.

What’s going on here? An overflow value of auto, hidden, or scroll makes an element into a scroll box. So now the sticky box’s scroll box is no longer the outer element, but the inner one, since that is now the closest ancestor that is able to scroll.

The sticky box appears to be static, but it isn’t. The crux here is that the scroll box could scroll, thanks to its overflow value, but doesn’t actually do so because we didn’t give it a height, and therefore it stretches up to accomodate all of its contents.

Thus we have a non-scrolling scroll box, and that is the root cause of our problems.

As before, the sticky box calculates its position by comparing its natural position relative to its scroll box with the one given by its inset properties. Point is: the sticky box doesn’t scroll relative to its scroll box, so its position always remains the same. Where in earlier examples the position of the sticky element relative to the scroll box changed when we scrolled, it no longer does so, because the scroll box doesn’t scroll. Thus there is no reason for it to switch to fixed positioning, and it stays where it is relative to its scroll box.

The fact that the scroll box itself scrolls upward is irrelevant; this doesn’t influence the sticky box in the slightest.

Sticky header

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Regular content

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

Content outside container

One solution is to give the new scroll box a height that is too little for its contents. Now the scroll box generates a scrollbar and becomes a scrolling scroll box. When we scroll it the position of the sticky box relative to its scroll box changes once more, and it switches from fixed to relative or vice versa as required.

Minor items

Finally a few minor items:

  • It is no longer necessary to use position: -webkit-sticky. All modern browsers support regular position: sticky. (But if you need to cater to a few older browsers, retaining the double syntax doesn’t hurt.)
  • Chrome (Mac) does weird things to the borders of the sticky items in these examples. I don’t know what’s going on and am not going to investigate.



  • CSS for JavaScripters

cky

Ricky Kej’s anthem for Bengaluru airport captures the emotions of departures and homecomings

Ricky Kej’s BLR Airport Anthem, featuring fellow Grammy-winner Lonnie Park, tells stories of travel and connection




cky

Medicine wheels of the Plains and Rocky Mountains / an update[d] compendium (Reeves and Kennedy) and edited collection of works by John Brumley, Ted Birmie, Rebecca Kallevig, Barry Dau, Trevor Peck, and Dean Wetzel ; overall editors, Brian O. K. Reeves, M

xxv, 359 pages : illustrations, maps ; 28 cm. + 1 folded map




cky

Rocky IV (1985) / starring, written and directed by Sylvester Stallone [DVD].

[U.K.] : Warner Bros, [2020]




cky

‘The Statue’ podcast thrills listeners with the legend of Philadelphia’s 10ft Rocky Balboa bronze sculpture

The statue draws an estimated four million visitors every year, and has become a cultural icon




cky

Ricky Kej, Anoushka Shankar nominated for 67th Grammy Awards

Ricky Kej, a three-time Grammy winner, has been nominated for his album Break of Dawn in the Best New Age, Ambient, or Chant Album category, while sitarist and composer Anoushka Shankar has been nominated for her album Chapter II: How Dark It Is Before Dawn




cky

Unlucky Cohorts: Estimating the Long-term Effects of Entering the Labor Market in a Recession in Large Cross-sectional Data Sets [electronic journal].

National Bureau of Economic Research




cky

A Sticky-Price View of Hoarding [electronic journal].

National Bureau of Economic Research




cky

Sticky Expectations and the Profitability Anomaly [electronic journal].




cky

Real Keynesian Models and Sticky Prices [electronic journal].

National Bureau of Economic Research




cky

‘Lucky’ Arjun tastes another win




cky

569: Apple’s Web Apps, Meta Quest and Vision Pro, and Missing Sticky Headers

How do you point out things in a UI? Are Arc Boosts the end of the web? What do you think of VR and AR / Vision Pro and Meta Quest? And what do you do when the sticky header goes missing?




cky

573: Google Reader, Sticky and Overflow, and Figma Thoughts

Chris breaks out his banjo, some thoughts on making music vs recording music, what happened to Google Reader and social reading, what black box properties can't Dave or Chris remember, follow up for dev teams communicating with designers, and what's Adobe going to do about Figma?




cky

Bevel Up : Chapter 4 - Becky & Liz / 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




cky

Vinicius, Mbappe on target as Madrid crush plucky Espanyol

The comprehensive victory was Madrid's 38th consecutive La Liga game without defeat, their last loss in the competition coming just under a year ago, against Atletico Madrid in September 2023




cky

Don't judge Kohli on current form, Australia series could change it all: Ricky Ponting

The much-awaited series against Pat Cummins' Australia will commence in Perth on November 22 and Kohli, as always, will be a vital cog in India's scheme of things if they are to retain the prestigious trophy




cky

Alonso ‘lucky’ to be alive




cky

Will Vicky Do Justice To Chhava?

Ishaan P Zore doesn't think Vicky Kaushal's persona quite matches Chhatrapati Sambhaji's iconic figure.




cky

Vicky Vidya Ka Woh Wala Video Review

Between tons of sexual innuendo and Kapil Sharma brand of slapstick gags characterised in loud caricatures, moronic behaviour, flimsy wigs and cartoonish rhythm, Vicky Vidya Ka Woh Wala Video's jarring notions of exuberance have nothing novel to offer, groans Sukanya Verma.





cky

Does Rocky Aur Rani Bring Out KJo 2.0?

Rocky Aur Rani is definitely Karan's most subversive project, discovers Aseem Chhabra.




cky

'Naruda Donoruda will work, like Vicky Donor'

Telugu actor Sumanth feels his Vicky Donor remake -- named Naruda Donoruda -- is just what his career needs.




cky

Your ducky’s microbiome, glow-in-the-dark squirt guns

Toys inspire biology, biology inspires toys




cky

Ricky Ponting advises Babar Azam to follow Virat Kohli’s approach and take a break to find form again




cky

Ricky Ponting says to not judge Virat Kohli on current form ahead of BGT: ‘If there’s a time for him to turn it around, it’d be this series’




cky

Maybe it’s the IPL: Ricky Ponting on India batters’ recent inability to counter spin




cky

What has Ponting got to do with Indian cricket? Gautam Gambhir hits back at Ricky Ponting over comments on Virat Kohli and Rohit Sharma




cky

Silliest thing you can do is to write off champion players: Mike Hussey on Virat Kohli and Rohit Sharma after Gautam Gambhir’s comments on Ricky Ponting




cky

EPA Awards $1 Million to Kentucky to Help Address Leaking Underground Storage Tanks

Louisville, Ky. (April 12, 2019) – The U.S.




cky

Purdue track coach Lonnie Greene leaving for Kentucky

Greene spent six years with the Boilermakers but is returning to the Southeastern Conference

      




cky

For IMS, Brickyard weekend means several contingencies, but focus is 'May in August' for Indy 500

Decision makers at Penske Entertainment are beginning to chart the course for a historic summer of racing at the Indianapolis Motor Speedway.

       




cky

Big blow for former Sunshine Girl - Registered Nurse Nichala Gibson recovered from COVID-19 but her father was not so lucky

THE LAST two months have been two of the worst in the life of former national netball star Nichala Gibson. She lives in New York City, the epicentre for the COVID-19 virus in the United States. Gibson and her sister suffered, then recovered from...






cky

Where Coal Was King, Pope's Climate Warning Faces a Tricky Sell

In West Virginia, where workers have harvested coal seams for centuries, Pope Francis’ new warning about the risks of fossil fuels will find skepticism even among the faithful.




cky

Where Coal Was King, Pope's Climate Warning Faces a Tricky Sell

In West Virginia, where workers have harvested coal seams for centuries, Pope Francis’ new warning about the risks of fossil fuels will find skepticism even among the faithful.




cky

Prisons of Appalachia: Kentucky town hopes new facility can boost economy

Many areas struggling with decline of coal industry count on correction projects to increase employment




cky

'We are so lucky to have had him': Michelle Obama, others honor Little Richard

"With his exuberance, his creativity, and his refusal to be anything other than himself, Little Richard laid the foundation for generations of artists to follow," Michelle Obama tweeted.




cky

Becky Thompson and Susan Pitts: On Mother's Day, 3 prayers for moms

In the stillness and the night, take heart in knowing that women across the world are joining you in prayer and that God is listening and loving you right where you are.




cky

‘It’s not some backyard fight’: Cruz rages after Triple C retains title... then retires

Controversy was on the cards when Dominick Cruz lost to a Henry Cejudo TKO in the bantamweight division at UFC 249, before the winner called time on his career.




cky

Mother's Day: Sara Ali Khan, Ishaan Khatter, Ananya Panday, Vicky Kaushal share childhood photos with mommas

As the nation celebrates the indomitable spirit of motherhood on Sunday, Bollywood celebrities also dedicated heart-warming messages to their mom's on the occasion of Mother's Day."

Sara Ali Khan shared a heart-melting throwback picture where she is seen as an infant in the arms of her grandmother while her mother is looking at baby Sara in a moment of affection. The actor captioned the post as, "Meri Maa ki Maa. Thank you for creating Mommy. #HappyMothersDay."

Vicky Kaushal put out a childhood throwback picture on Instagram where the actor is seen caught in a moment of mischief as he jogs at the shore of a beach, while his mother is seen scolding him. Along with the picture Vicky wrote," Dodging them till date. Keep them coming Maa. Love you! 

 
 
 
View this post on Instagram

Dodging them till date. Keep them coming Maa. Love you! ❤ï¸Â

A post shared by Vicky Kaushal (@vickykaushal09) onMay 9, 2020 at 5:40pm PDT

Ananya Panday shared an adorable video from her childhood days where she is seen sporting a while kurta-churidar with a red dotted dupatta. The video initiates with a question by a person behind the camera who asks, "Whom do you love the most in the world?"

To which baby Ananya innocently replies, "Mama."

And he asks, "And the second?"

She smilingly replies, "Nobody."

 
 
 
View this post on Instagram

The answer is still the same 😜 love u @bhavanapandey ❤ï¸Â

A post shared by Ananya 💛💫 (@ananyapanday) onMay 9, 2020 at 12:16pm PDT

Along with the caption she wrote, "The answer is still the same. love u @bhavanapandey."

Recalling his childhood moments spent with her mom, Ishaan Khatter shared a couple of throwback pictures with his mom in an Instagram post.

 
 
 
View this post on Instagram

Mom for president ✌🏼

A post shared by Ishaan (@ishaankhatter) onMay 9, 2020 at 1:16pm PDT

The special post featured 3 pictures of which the first one shows baby Ishaan lying in bed while his mother is seen pecking a kiss on his little arms. The second one shows his mom in a glamorous monochromatic picture, and the third one shows baby Ishaan in his childhood days, where he is seen sitting in his mother's lap and passing a smile at the camera.Along with the post he wrote, "Mom for president."

Catch up on all the latest entertainment news and gossip here. Also, download the new mid-day Android and iOS apps.

Mid-Day is now on Telegram. Click here to join our channel (@middayinfomedialtd) and stay updated with the latest news

This story has been sourced from a third party syndicated feed, agencies. Mid-day accepts no responsibility or liability for its dependability, trustworthiness, reliability and data of the text. Mid-day management/mid-day.com reserves the sole right to alter, delete or remove (without notice) the content in its absolute discretion for any reason whatsoever




cky

Congress makes legislative council polls tricky

The Congress has declared two candidates, making the ensuing legislative council poll elections more interesting. This means the polls in which CM Uddhav Thackeray is one of the nine candidates, will be decided through voting on May 21, unless one of the 10 candidates for the nine vacancies withdraws next week.

Rajesh Rathod was the Congress's choice cleared by the high command on Saturday. Papa Modi was announced at a state level, indicating that it could be a tactic to get more nominations in future polls. The BJP has fielded four—Ranjitsinh Mohite Patil, Praveen Datke, Gopichand Padalkar and Dr Ajit Gopchhede. The NCP has given tickets to Shashikant Shinde and Amol Mitkari. The Sena has the CM and Neelam Gorhe, deputy chairman of the upper house.

Catch up on all the latest Mumbai news, crime news, current affairs, and a complete guide from food to things to do and events across Mumbai. Also download the new mid-day Android and iOS apps to get latest updates.

Mid-Day is now on Telegram. Click here to join our channel (@middayinfomedialtd) and stay updated with the latest news




cky

The Tricky Homophones!

English is often said to be a confusing language - and when it comes to homophones, we know how that notion came to be!

Homophones,...




cky

Kmart shopper use pie maker to create oozing rocky road pastry tarts with leftover Easter eggs

An Australian home cook has wowed foodies after using Kmart's popular pie maker to create oozing rocky road pastry tarts with leftover Easter eggs.




cky

Vicky Pattison reveals her boyfriend Ercan Ramadan 'ALWAYS wants to have sex'

The former Geordie Shore star, 32, also revealed that she's developed a crush on Good Morning Britain presenter Piers Morgan.




cky

M/S Anjani Broadband Pvt. Ltd vs M/S Lucky Airnet Pvt. Ltd on 8 May, 2020

2. The case of the plaintiff as disclosed from the plaint is that the plaintiff is engaged in the business of providing internet services under licence from Department of Telecommunications, Ministry of Communications & Information Technology. The defendants approached the plaintiff for taking internet services and after negotiations the plaintiff agreed to provide services to a defendant and thereafter the plaintiff and the defendant signed customer application form (CAF) on 04.04.2015. The plaintiff provided the internet services to a defendant No. 1 company on monthly basis and after providing the services, the plaintiff raised bill of Rs.27,54193/­ and out of the said amount the defendants paid a sum of Rs. 22,08,000/­ and the balance sum of Rs. 5,46,193/­ is outstanding and due against the defendants which defendants failed to pay despite demands from the plaintiff.




cky

The lucky rag picker


She only knows at the end of each day whether there will be enough money to survive tomorrow. Does this woman have rights, the right to produce a child? Or should someone else decide what her rights are, and conclude that sterilisation is the only option, asks Kalpana Sharma.




cky

Mother’s Day 2020: Vicky Kaushal, Kiara Advani, Mahesh Babu and others share adorable photos