ty

99 cities recorded ‘poor’ air quality a day after Deepavali 

Ambala in Haryana recorded the highest AQI of 367 followed by Amritsar in Punjab at 350, while Delhi’s average AQI was 339; PM2.5 levels in Delhi reached values seen only in mid-winter months.




ty

Himachal urges Centre to explore possibility of running trains on green hydrogen on Kalka-Shimla heritage rail track

The Kalka–Shimla railway is a narrow-gauge railway in Himachal Pradesh, which traverses a mostly-mountainous route from Kalka to Shimla




ty

Green Humour by Rohan Chakravarty on UN climate conference COP29 in Baku, Azerbaijan




ty

Your hair-stylist, tattoo artist, tailor can help monitor metabolic health, says Dr Sarin

In his book “Own Your Body,” Dr Shiv Sarin advocates for educating these professionals to look for signs like black lines, skin tags, and waist-to-hip ratios, which could indicate underlying health issues




ty

BE’s 14-Valent Pneumococcal Conjugate Vaccine: Phase III trials prove ‘safety’

Pneubevax14   14 was found to be safe and induced robust and functional serotype specific immune responses to all 14 serotypes




ty

Solar storms that caused pretty auroras can create havoc with technology — here’s how

These storms, caused by high energy particles from the Sun hitting our atmosphere, have the potential to knock out electrical grids and satellites




ty

Raman Research Institute achieve breakthrough in quantum cybersecurity

This innovation has the potential to revolutionise data encryption and security, offering enhanced protection for sensitive information in digital interactions.




ty

India to sign High Seas Treaty in September, joining global effort to protect ocean biodiversity

India’s participation will enable it to contribute to global ocean governance, access biodiversity funds, and play a role in establishing marine protected areas and sharing marine genetic resources.




ty

Boeing’s Starliner lands empty as astronauts stay behind on ISS

Despite the successful landing, two test pilots, Butch Wilmore and Sunita Williams, will remain in space until next year due to NASA’s safety concerns.




ty

Day Trading Guide for October 30, 2024: Intraday supports, resistances for Nifty50 stocks

Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI



  • Day trading guide

ty

Nifty Prediction Today – October 30, 2024: Can be range bound. Stay out of the market

Nifty 50 October Futures contract can oscillate in a range of 24,300-24,600




ty

Bank Nifty prediction today – Oct 30, 2024: Intraday trend uncertain at the moment

The key levels for Bank Nifty futures are 51,200 and 52,700




ty

Day trading guide for October 31, 2024: Intraday supports, resistances for Nifty50 stocks

Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI



  • Day trading guide

ty

Index Outlook: Sensex, Nifty 50 consolidate as the fall pauses

One more leg of downmove is still a possibility before the broader uptrend resumes 




ty

Nifty Prediction Today – November 04, 2024: Bearish. Go short now and on a rise

Nifty 50 November Futures contract can fall to 23,950 and 23,800




ty

Bank Nifty prediction today – November 4, 2024: Bears gaining momentum

Bank Nifty futures might see a fall to 50,800




ty

Nifty Prediction today – Nov 5, 2024: Downtrend might resume, go short

Nifty futures can decline to 23,500 in the near term




ty

Bank Nifty Prediction today – Nov 5, 2024: Might fall off a barrier, initiate short

Bank Nifty November futures areis likely to see a decline




ty

Day trading guide for November 5, 2024: Intraday supports, resistances for Nifty50 stocks

Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI



  • Day trading guide

ty

Weekly Rupee View: Rupee set to witness higher volatility

US election and the Fed policy announcement are the key events




ty

Day trading guide for November 6, 2024: Intraday supports, resistances for Nifty50 stocks

Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI



  • Day trading guide

ty

Nifty Prediction today – Nov 6, 2024: Momentum favours bulls, go long

Nifty futures can rise to 24,750




ty

Bank Nifty Prediction today – Nov 6, 2024: Intraday trend uncertain, stay out

Bank Nifty futures is trading between key levels at 52,000 and 52,800




ty

Day trading guide for November 7, 2024: Intraday supports, resistances for Nifty50 stocks

Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI



  • Day trading guide

ty

Bank Nifty Prediction today – Nov 7, 2024: Hovering around a support, short if this base is broken

Bank Nifty futures can fall to 51,300 if it slips below 52,000 




ty

Nifty Prediction today – Nov 7, 2024: Bears gain momentum; go short if the support is breached

Nifty futures has a support at 24,250; a breach of this can lead to a fall to 24,000 




ty

Natural gas futures: Uncertainty prevails

Traders need to wait for strong cues about next leg of trend




ty

Day trading guide for November 8, 2024: Intraday supports, resistances for Nifty50 stocks

Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI



  • Day trading guide

ty

Nifty prediction today – Nov 8, 2024: Intraday outlook is unclear. Stay out of the market

Nifty 50 November futures contract can oscillate in a range of 24,150-24,400




ty

Bank Nifty prediction today – Nov 8, 2024: Trading within a range

Bank Nifty futures is currently stuck between 52,000 and 52,500




ty

Why you should home in on this premium realty player

Robust traction in the upmarket residential segment, healthy occupancies in its commercial rental business and healthy financials are positives for Oberoi Realty




ty

Crude Check: No clarity in trend

Traders can avoid new positions




ty

Index Outlook: Vulnerable Sensex, Nifty 50 struggle

Strong resistance coming up to halt the rally in the Dow Jones




ty

Nifty Prediction Today – November 11, 2024: Resistance ahead. Go short on a rise

Nifty 50 November Futures contract can fall to 23,900




ty

Bank Nifty Prediction Today – November 11, 2024: Wait for dips to go long

Bank Nifty November Futures can rise to 52,500 if the bounce sustains




ty

Day trading guide for November 12, 2024: Intraday supports, resistances for Nifty50 stocks

Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI



  • Day trading guide

ty

Custom properties and @property

You’re reading a failed article. I hoped to write about @property and how it is useful for extending CSS inheritance considerably in many different circumstances. Alas, I failed. @property turns out to be very useful for font sizes, but does not even approach the general applicability I hoped for.

Grandparent-inheriting

It all started when I commented on what I thought was an interesting but theoretical idea by Lea Verou: what if elements could inherit the font size of not their parent, but their grandparent? Something like this:

div.grandparent {
	/* font-size could be anything */
}

div.parent {
	font-size: 0.4em;
}

div.child {
	font-size: [inherit from grandparent in some sort of way];
	font-size: [yes, you could do 2.5em to restore the grandparent's font size];
	font-size: [but that's not inheriting, it's just reversing a calculation];
	font-size: [and it will not work if the parent's font size is also unknown];
}

Lea told me this wasn’t a vague idea, but something that can be done right now. I was quite surprised — and I assume many of my readers are as well — and asked for more information. So she wrote Inherit ancestor font-size, for fun and profit, where she explained how the new Houdini @property can be used to do this.

This was seriously cool. Also, I picked up a few interesting bits about how CSS custom properties and Houdini @property work. I decided to explain these tricky bits in simple terms — mostly because I know that by writing an explanation I myself will understand them better — and to suggest other possibilities for using Lea’s idea.

Alas, that last objective is where I failed. Lea’s idea can only be used for font sizes. That’s an important use case, but I had hoped for more. The reasons why it doesn’t work elsewhere are instructive, though.

Tokens and values

Let’s consider CSS custom properties. What if we store the grandparent’s font size in a custom property and use that in the child?

div.grandparent {
	/* font-size could be anything */
	--myFontSize: 1em;
}

div.parent {
	font-size: 0.4em;
}

div.child {
	font-size: var(--myFontSize);
	/* hey, that's the grandparent's font size, isn't it? */
}

This does not work. The child will have the same font size as the parent, and ignore the grandparent. In order to understand why we need to understand how custom properties work. What does this line of CSS do?

--myFontSize: 1em;

It sets a custom property that we can use later. Well duh.

Sure. But what value does this custom property have?

... errr ... 1em?

Nope. The answer is: none. That’s why the code example doesn’t work.

When they are defined, custom properties do not have a value or a type. All that you ordered the browsers to do is to store a token in the variable --myFontSize.

This took me a while to wrap my head around, so let’s go a bit deeper. What is a token? Let’s briefly switch to JavaScript to explain.

let myVar = 10;

What’s the value of myVar in this line? I do not mean: what value is stored in the variable myVar, but: what value does the character sequence myVar have in that line of code? And what type?

Well, none. Duh. It’s not a variable or value, it’s just a token that the JavaScript engine interprets as “allow me to access and change a specific variable” whenever you type it.

CSS custom properties also hold such tokens. They do not have any intrinsic meaning. Instead, they acquire meaning when they are interpreted by the CSS engine in a certain context, just as the myVar token is in the JavaScript example.

So the CSS custom property contains the token 1em without any value, without any type, without any meaning — as yet.

You can use pretty any bunch of characters in a custom property definition. Browsers make no assumptions about their validity or usefulness because they don’t yet know what you want to do with the token. So this, too, is a perfectly fine CSS custom property:

--myEgoTrip: ppk;

Browsers shrug, create the custom property, and store the indicated token. The fact that ppk is invalid in all CSS contexts is irrelevant: we haven’t tried to use it yet.

It’s when you actually use the custom property that values and types are assigned. So let’s use it:

background-color: var(--myEgoTrip);

Now the CSS parser takes the tokens we defined earlier and replaces the custom property with them:

background-color: ppk;

And only NOW the tokens are read and intrepreted. In this case that results in an error: ppk is not a valid value for background-color. So the CSS declaration as a whole is invalid and nothing happens — well, technically it gets the unset value, but the net result is the same. The custom property itself is still perfectly valid, though.

The same happens in our original code example:

div.grandparent {
	/* font-size could be anything */
	--myFontSize: 1em; /* just a token; no value, no meaning */
}

div.parent {
	font-size: 0.4em;
}

div.child {
	font-size: var(--myFontSize);
	/* becomes */
	font-size: 1em; 
	/* hey, this is valid CSS! */
	/* Right, you obviously want the font size to be the same as the parent's */
	/* Sure thing, here you go */
}

In div.child he tokens are read and interpreted by the CSS parser. This results in a declaration font-size: 1em;. This is perfectly valid CSS, and the browsers duly note that the font size of this element should be 1em.

font-size: 1em is relative. To what? Well, to the parent’s font size, of course. Duh. That’s how CSS font-size works.

So now the font size of the child becomes the same as its parent’s, and browsers will proudly display the child element’s text in the same font size as the parent element’s while ignoring the grandparent.

This is not what we wanted to achieve, though. We want the grandparent’s font size. Custom properties — by themselves — don’t do what we want. We have to find another solution.

@property

Lea’s article explains that other solution. We have to use the Houdini @property rule.

@property --myFontSize {
	syntax: "<length>";
	initial-value: 0;
	inherits: true;
}

div {
	border: 1px solid;
	padding: 1em;
}

div.grandparent {
	/* font-size could be anything */
	--myFontSize: 1em;
}

div.parent {
	font-size: 0.4em;
}

div.child {
	font-size: var(--myFontSize);
}

Now it works. Wut? Yep — though only in Chrome so far.

This is the grandparent
This is the parent
This is the child

What black magic is this?

Adding the @property rule changes the custom property --myFontSize from a bunch of tokens without meaning to an actual value. Moreover, this value is calculated in the context it is defined in — the grandfather — so that the 1em value now means 100% of the font size of the grandfather. When we use it in the child it still has this value, and therefore the child gets the same font size as the grandfather, which is exactly what we want to achieve.

(The variable uses a value from the context it’s defined in, and not the context it’s executed in. If, like me, you have a grounding in basic JavaScript you may hear “closures!” in the back of your mind. While they are not the same, and you shouldn’t take this apparent equivalency too far, this notion still helped me understand. Maybe it’ll help you as well.)

Unfortunately I do not quite understand what I’m doing here, though I can assure you the code snippet works in Chrome — and will likely work in the other browsers once they support @property.

Misson completed — just don’t ask me how.

Syntax

You have to get the definition right. You need all three lines in the @property rule. See also the specification and the MDN page.

@property --myFontSize {
	syntax: "<length>";
	initial-value: 0;
	inherits: true;
}

The syntax property tells browsers what kind of property it is and makes parsing it easier. Here is the list of possible values for syntax, and in 99% of the cases one of these values is what you need.

You could also create your own syntax, e.g.

syntax: "ppk | <length>"

Now the ppk keyword and any sort of length is allowed as a value.

Note that percentages are not lengths — one of the many things I found out during the writing of this article. Still, they are so common that a special value for “length that may be a percentage or may be calculated using percentages” was created:

syntax: "<length-percentage>"

Finally, one special case you need to know about is this one:

syntax: "*"

MDN calls this a universal selector, but it isn’t, really. Instead, it means “I don’t know what syntax we’re going to use” and it tells browsers not to attempt to interpret the custom property. In our case that would be counterproductive: we definitely want the 1em to be interpreted. So our example doesn’t work with syntax: "*".

initial-value and inherits

An initial-value property is required for any syntax value that is not a *. Here that’s simple: just give it an initial value of 0 — or 16px, or any absolute value. The value doesn’t really matter since we’re going to overrule it anyway. Still, a relative value such as 1em is not allowed: browsers don’t know what the 1em would be relative to and reject it as an initial value.

Finally, inherits: true specifies that the custom property value can be inherited. We definitely want the computed 1em value to be inherited by the child — that’s the entire point of this experiment. So we carefully set this flag to true.

Other use cases

So far this article merely rehashed parts of Lea’s. Since I’m not in the habit of rehashing other people’s articles my original plan was to add at least one other use case. Alas, I failed, though Lea was kind enough to explain why each of my ideas fails.

Percentage of what?

Could we grandfather-inherit percentual margins and paddings? They are relative to the width of the parent of the element you define them on, and I was wondering if it might be useful to send the grandparent’s margin on to the child just like the font size. Something like this:

@property --myMargin {
	syntax: "<length-percentage>";
	initial-value: 0;
	inherits: true;
}

div.grandparent {
	--myMargin: 25%;
	margin-left: var(--myMargin);
}

div.parent {
	font-size: 0.4em;
}

div.child {
	margin-left: var(--myMargin);
	/* should now be 25% of the width of the grandfather's parent */
	/* but isn't */
}

Alas, this does not work. Browsers cannot resolve the 25% in the context of the grandparent, as they did with the 1em, because they don’t know what to do.

The most important trick for using percentages in CSS is to always ask yourself: “percentage of WHAT?”

That’s exactly what browsers do when they encounter this @property definition. 25% of what? The parent’s font size? Or the parent’s width? (This is the correct answer, but browsers have no way of knowing that.) Or maybe the width of the element itself, for use in background-position?

Since browsers cannot figure out what the percentage is relative to they do nothing: the custom property gets the initial value of 0 and the grandfather-inheritance fails.

Colours

Another idea I had was using this trick for the grandfather’s text colour. What if we store currentColor, which always has the value of the element’s text colour, and send it on to the grandchild? Something like this:

@property --myColor {
	syntax: "<color>";
	initial-value: black;
	inherits: true;
}

div.grandparent {
	/* color unknown */
	--myColor: currentColor;
}

div.parent {
	color: red;
}

div.child {
	color: var(--myColor);
	/* should now have the same color as the grandfather */
	/* but doesn't */
}

Alas, this does not work either. When the @property blocks are evaluated, and 1em is calculated, currentColor specifically is not touched because it is used as an initial (default) value for some inherited SVG and CSS properties such as fill. Unfortunately I do not fully understand what’s going on, but Tab says this behaviour is necessary, so it is.

Pity, but such is life. Especially when you’re working with new CSS functionalities.

Conclusion

So I tried to find more possbilities for using Lea’s trick, but failed. Relative units are fairly sparse, especially when you leave percentages out of the equation. em and related units such as rem are the only ones, as far as I can see.

So we’re left with a very useful trick for font sizes. You should use it when you need it (bearing in mind that right now it’s only supported in Chromium-based browsers), but extending it to other declarations is not possible at the moment.

Many thanks to Lea Verou and Tab Atkins for reviewing and correcting an earlier draft of this article.



  • CSS for JavaScripters

ty

Redefining inclusivity

Blind Bake and The Echoes are unique cafes that provide employment to specially abled people 




ty

Ruhani Sharma: I play a close-to-reality cop in ‘HER’; there is no scope for ‘Singham’ style of histrionics

Ruhani Sharma talks about headlining the Telugu cop drama franchise ‘HER’, says she never imagined herself as a sharpshooter 




ty

Man, wife bludgeon mother to death over property row




ty

Pawan Kalyan’s ‘They call him OG’ promises to be a stylish action extravaganza

The teaser of director Sujeeth and Pawan Kalyan’s ‘They call him OG’ reveals an action entertainer set in Mumbai




ty

Anushka Shetty on ‘Miss Shetty Mr Polishetty’: The simplest of stories can be tough to narrate

Actor Anushka Shetty talks about her new Telugu film ‘Miss Shetty Mr Polishetty’, signing her first Malayalam film ‘Kathanar’ and why she felt the need to pause and reboot




ty

‘Miss Shetty Mr Polishetty’ movie review: Anushka Shetty, Naveen Polishetty shoulder a simple urban romance with fun moments

Naveen Polishetty’s flair for humour and Anushka Shetty’s restrained act work but the simple, predictable ‘Miss Shetty Mr Polishetty’ needed more emotional heft




ty

School Education Department issues safety directives ahead of monsoon

School authorities told to stay alert and ensure that children do not go near the ponds or tanks in the area to play; electrical connections to be checked




ty

Zonal misclassification: Government waives ₹240 crore property tax penalty levied by BBMP

Penalty was levied for zonal misclassification while paying property tax online




ty

Rakshit Shetty: We believed that ‘Sapta Sagaradaache Ello’ will find takers in Telugu

Ahead of the release of ‘Sapta Sagaralu Dhaati’, the Telugu version of the Kannada romance saga ‘Sapta Sagaradhaache Ello’, Rakshit Shetty, Hemanth Rao and Rukmini Vasanth assert that they believed their film would travel far and wide




ty

Genetic Testing for Inherited Cancer Susceptibility Syndromes

A fact sheet about genetic testing for inherited cancer risk, including who should consider testing, how to understand test results, and who has access to a person’s test results. Also contains information about at-home, or direct-to-consumer, genetic tests.




ty

How Bloom In Green festival is attempting to spread the message of community and conscious living

Krishnagiri is set to host the fourth edition Bloom In Green festival from December 15 to 18




ty

Araku Pinery, a new community-based eco-tourism project near Visakhapatnam

Enjoy misty winter mornings with a warm cup of coffee at Araku Pinery, a new eco-tourism project by the AP Forest Department in Anjoda, located at a distance of about 130 kilometres from Visakhapatnam




ty

Experience diverse themes in photography in an exhibition in Andhra University

A two-day exhibition by students of Diploma in Photography of Andhra University in Visakhapatnam unfolds diverse themes and creative vision



  • Life &amp; Style