sto Jordan Mailata listed as full practice participant, Eagles waive Jack Stoll By sports.yahoo.com Published On :: Tue, 12 Nov 2024 22:55:41 GMT Eagles left tackle Jordan Mailata was listed as a full participant in practice for the second straight day on Tuesday. Full Article article Sports
sto Conversation and Data Storage Program By catswhocode.com Published On :: Sun, 18 Jun 2023 00:00:00 +0000 Communication and data safe-keeping platform assists you to save digital information, letting it be gathered for use. This may include paperwork, videos, music, user personal preferences and options, and other info. Data storage alternatives have evolved to provide forward-thinking and detailed options intended for storing a huge volume of info. There are many different strategies […] Full Article Blog
sto Features of Data Via the internet Storage By catswhocode.com Published On :: Sun, 18 Jun 2023 00:00:00 +0000 Data on the web storage enables users to store files upon remote servers, accessible via an internet connection. It is actually used to retail outlet a variety of digital content which includes documents, video tutorials and photographs. Unlike local or portable storage products that www.thedataroom.website/docsend-chrome-extension-setting-up-guide/ can easily be shed or harmed, cloud-based storage area is […] Full Article Blog
sto Legit Customer Reviews of Talkliv By catswhocode.com Published On :: Thu, 22 Jun 2023 00:00:00 +0000 Articles What it could be like as being a foreign female in China and tiawan Humorous approaches to express like The profiles are all genuine with real Chinese photos and never any of those retouched https://top10chinesedatingsites.net/jiayuan-review/ photos. Many Chinese singles here are also fluent in their English speaking and writing abilities which makes it convenient […] Full Article Blog
sto Storage area of Secret Information By catswhocode.com Published On :: Mon, 17 Jul 2023 00:00:00 +0000 Storage of confidential info is an ongoing concern for any business that takes care of sensitive info. In the digital world, what this means is passwords and firewalls and encryption of files prior to sending them to a client or storing them on a pc network. This is especially important when sharing files via email […] Full Article Blog
sto Data Room Guidelines for Investors By catswhocode.com Published On :: Mon, 17 Jul 2023 00:00:00 +0000 Whether you happen to be raising funds or working together on a job, you have to ensure that your documents are attainable and organized. That is why it is important to adopt data room best practices. A well-organized virtual dataroom accelerates financial transactions and helps members deliver issues responsibilities. It could be recommended that you […] Full Article Blog
sto Swiggy Stock Market Listing Today: Will Investors Make Money From Swiggy IPO? Check What Expert Says By Published On :: Wednesday, November 13, 2024, 08:37 +0530 Shivani Nyati, Head of Wealth at Swastika Investmart Ltd said that a cautious approach needed for the Swiggy IPO. Full Article
sto Uttar Pradesh set to transform historic forts and palaces into luxurious heritage hotels By www.thehindubusinessline.com Published On :: Fri, 31 May 2024 20:43:27 +0530 In the initial phase, properties such as Chunar Fort in Mirzapur, Barua Sagar Fort in Jhansi, Jal Mahal in Barsana, Lucknow’s Chattar Manzil and Kothi Roshan-ud-Daula, and Shukla Talab Haveli in Kanpur will be transformed into hotels Full Article Variety
sto Iberian Lynx makes historic comeback from brink of extinction By www.thehindubusinessline.com Published On :: Fri, 21 Jun 2024 06:52:42 +0530 The Iberian Lynx, once teetering on the brink of extinction, has made an extraordinary recovery in Spain and Portugal, with its adult population soaring from just 62 in 2001 to over 2,000 today Full Article Variety
sto Digital vigilante takes on scams in app stores of tech giants By www.thehindubusinessline.com Published On :: Sat, 26 Oct 2024 15:36:12 +0530 “I started because I was curious enough and this issue was not being fixed by the app stores,” says Babu Lal Full Article Variety
sto In charts| Women investors in mutual funds on the rise By www.thehindubusinessline.com Published On :: Tue, 12 Mar 2024 19:07:42 +0530 Here are four charts illustrating the evolving profile of women investors in mutual funds Full Article Portfolio
sto Stop food firms from catching them young By www.thehindubusinessline.com Published On :: Sun, 21 Apr 2024 21:01:09 +0530 It’s not ‘business as usual’ for food companies anymore Full Article From the Viewsroom
sto Stop ‘animal diplomacy’ now By www.thehindubusinessline.com Published On :: Tue, 21 May 2024 21:23:35 +0530 Politicians need to come up with better, non-living gifts Full Article From the Viewsroom
sto Jitters on policy continuity for PSU stocks By www.thehindubusinessline.com Published On :: Tue, 04 Jun 2024 19:18:41 +0530 Within sectors, it was PSUs that witnessed the highest declines in the day Full Article Statistalk
sto Starbucks opens ninth store in India By www.thehindu.com Published On :: Tue, 26 Mar 2013 17:05:41 +0530 Full Article Industry
sto Auto sector slowdown: The story of auto-component makers By www.thehindubusinessline.com Published On :: Tue, 27 Aug 2019 10:12:34 +0530 Whether it’s Coimbatore, Pune or Chennai, auto-component makers have hit a speedbreaker. BusinessLine reports Full Article India File
sto Fasal Bima, a story of dashed hopes By www.thehindubusinessline.com Published On :: Tue, 19 Nov 2019 08:39:34 +0530 Farmers, reeling under crop losses, feel the Centre’s crop insurance scheme is merely helping insurance firms make profits. Radheshyam Jadhav reports Full Article India File
sto Summer of discontent for small investors By www.thehindubusinessline.com Published On :: Wed, 20 May 2020 14:09:46 +0530 Whether it’s PMC, DHFL, CKP or Franklin Templeton, it’s a story of ordinary middle-class folk losing their life savings Full Article India File
sto Flood-hit towns in Space brace for another storm By www.thehindu.com Published On :: Wed, 13 Nov 2024 08:51:58 +0530 Two weeks after the worst floods in Spain’s modern history, its national weather service issued an alert for torrential rains in the same area Full Article Environment
sto ISRO reaches new milestone, successfully lands Pushpak reusable launch vehicle By www.thehindubusinessline.com Published On :: Sat, 23 Mar 2024 15:40:27 +0530 ISRO conducted successful RLV-LEX-02 experiment demonstrating autonomous landing capabilities from high altitudes, marking progress in space technology Full Article Science
sto Sky is the limit for India’s space technology story By www.thehindubusinessline.com Published On :: Wed, 08 May 2024 21:57:07 +0530 In 2023, Chandrayaan-3 and Aditya L-1 missions highlighted India’s global space prominence Full Article Elections 2024
sto Solar storms that caused pretty auroras can create havoc with technology — here’s how By www.thehindubusinessline.com Published On :: Thu, 16 May 2024 14:39:46 +0530 These storms, caused by high energy particles from the Sun hitting our atmosphere, have the potential to knock out electrical grids and satellites Full Article Science
sto Agnikul Cosmos makes history, launching Agnibaan rocket powered by 3-D printed semi-cryo engine By www.thehindubusinessline.com Published On :: Thu, 30 May 2024 10:01:08 +0530 This launch, which comes after several previous attempts, marks a major achievement as the first-ever controlled flight of a semi-cryogenic liquid engine realized through additive manufacturing Full Article Science
sto “Take us to space and back”: Sunita Williams makes history with NASA’s Boeing Starliner By www.thehindubusinessline.com Published On :: Thu, 06 Jun 2024 09:26:27 +0530 The historic test flight, with fellow astronaut Barry Wilmore, aims to certify Starliner for routine space travel. Full Article Science
sto Day Trading Guide for October 30, 2024: Intraday supports, resistances for Nifty50 stocks By www.thehindubusinessline.com Published On :: Wed, 30 Oct 2024 06:05:00 +0530 Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI Full Article Day trading guide
sto Stock to buy today: ICICI Securities (₹882.30): BUY By www.thehindubusinessline.com Published On :: Wed, 30 Oct 2024 06:30:00 +0530 ICICI Securities share price can rise to ₹930-₹950 initially and then to ₹980 eventually Full Article Technical Analysis
sto Day trading guide for October 31, 2024: Intraday supports, resistances for Nifty50 stocks By www.thehindubusinessline.com Published On :: Thu, 31 Oct 2024 06:07:00 +0530 Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI Full Article Day trading guide
sto Stock to buy today: Balrampur Chini Mills (₹658.70): BUY By www.thehindubusinessline.com Published On :: Thu, 31 Oct 2024 06:30:00 +0530 Balrampur Chini Mills share price can rise to ₹735 and ₹750 Full Article Technical Analysis
sto Diwali Muhurat Trading 2024: Samvat 2081 stock pick: Sun TV Network - BUY By www.thehindubusinessline.com Published On :: Fri, 01 Nov 2024 10:00:00 +0530 Sun TV Network share price has potential to target ₹1,200 and ₹1,500 from a long-term perspective Full Article Technical Analysis
sto Dhanuka Agritech: What should investors do? By www.thehindubusinessline.com Published On :: Sat, 02 Nov 2024 17:32:41 +0530 At the current price of ₹1,570.15, the stock trades 29 times FY24 earnings and about 24 times and 19 times its estimated FY25 and FY26 earnings Full Article Stock Fundamentals
sto Movers & Shakers: Stocks that will see action this week By www.thehindubusinessline.com Published On :: Sat, 02 Nov 2024 17:45:16 +0530 Here is what the charts say about the shares of Natco Pharma, The Ramco Cements and Tata Power Full Article Technical Analysis
sto Stock to buy today: J.B. Chemicals and Pharmaceuticals (₹1,961.80): BUY By www.thehindubusinessline.com Published On :: Mon, 04 Nov 2024 06:30:00 +0530 J.B. Chemicals and Pharmaceuticals share price can rise to ₹2,100 Full Article Technical Analysis
sto Today’s Stock Recommendation: November 5, 2024 By www.thehindubusinessline.com Published On :: Tue, 05 Nov 2024 06:30:00 +0530 The stock idea that we have for you today is Angel One Full Article Video
sto Stock to buy today: Angel One (₹2,886.35): BUY By www.thehindubusinessline.com Published On :: Tue, 05 Nov 2024 06:30:00 +0530 Angel One share price can rise to ₹3,400 after some more fall from here Full Article Technical Analysis
sto Day trading guide for November 5, 2024: Intraday supports, resistances for Nifty50 stocks By www.thehindubusinessline.com Published On :: Tue, 05 Nov 2024 12:01:00 +0530 Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI Full Article Day trading guide
sto Day trading guide for November 6, 2024: Intraday supports, resistances for Nifty50 stocks By www.thehindubusinessline.com Published On :: Wed, 06 Nov 2024 06:20:00 +0530 Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI Full Article Day trading guide
sto Stock to buy today: Tata Steel (₹152.30) By www.thehindubusinessline.com Published On :: Wed, 06 Nov 2024 06:30:00 +0530 For the short term, traders can buy shares of Tata Steel at ₹152 and on a dip to ₹148 Full Article Technical Analysis
sto Day trading guide for November 7, 2024: Intraday supports, resistances for Nifty50 stocks By www.thehindubusinessline.com Published On :: Thu, 07 Nov 2024 06:19:00 +0530 Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI Full Article Day trading guide
sto Stock to buy today: PNB Housing Finance (₹999.2) By www.thehindubusinessline.com Published On :: Thu, 07 Nov 2024 06:30:00 +0530 The price action over the past couple of weeks indicates good buying interest Full Article Technical Analysis
sto Day trading guide for November 8, 2024: Intraday supports, resistances for Nifty50 stocks By www.thehindubusinessline.com Published On :: Fri, 08 Nov 2024 06:26:00 +0530 Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI Full Article Day trading guide
sto Stock to buy today: Deepak Nitrite (₹2,815.65) By www.thehindubusinessline.com Published On :: Fri, 08 Nov 2024 06:30:00 +0530 Although there was a price drop on Thursday, the scrip retains its bullishness Full Article Technical Analysis
sto Movers & Shakers: Stocks that will see action this week By www.thehindubusinessline.com Published On :: Sat, 09 Nov 2024 18:43:41 +0530 Here is what the charts say about IGL, JSW Energy and Max Financial Services Full Article Technical Analysis
sto Trump, tariffs and tax cuts – Can they power the US stock markets ahead? By www.thehindubusinessline.com Published On :: Sat, 09 Nov 2024 20:42:45 +0530 As Trump 2.0 gets set to take control, the US markets are a play of opposing factors Full Article Big Story
sto Market correction broad-based with 7 of 10 stocks of BSE AllCap seeing a fall By www.thehindubusinessline.com Published On :: Sat, 09 Nov 2024 22:02:55 +0530 FPI outflows overlapping with earnings slowdown and the return of the dragon weigh in Full Article Portfolio
sto Stock to buy today: Mahindra & Mahindra (₹2,979.25): BUY By www.thehindubusinessline.com Published On :: Mon, 11 Nov 2024 06:30:00 +0530 Mahindra & Mahindra share price can rise to ₹3,200 Full Article Technical Analysis
sto Day trading guide for November 12, 2024: Intraday supports, resistances for Nifty50 stocks By www.thehindubusinessline.com Published On :: Tue, 12 Nov 2024 06:07:00 +0530 Here are the intraday supports and resistances for widely traded stocks such as Reliance Industries, ITC, ONGC, Infosys, HDFC Bank, TCS, and SBI Full Article Day trading guide
sto Stock to buy today: HCL Technologies (₹1,867): BUY By www.thehindubusinessline.com Published On :: Tue, 12 Nov 2024 06:30:00 +0530 HCL Technologies share price can rise to ₹1,935 Full Article Technical Analysis
sto Two options for using custom properties By www.quirksmode.org Published On :: Tue, 04 May 2021 15:16:56 +0100 Recently I interviewed Stefan Judis for my upcoming book. We discussed CSS custom properties, and something interesting happened. We had a period of a few minutes where we were talking past one another, because, as it turns out, we have completely opposite ideas about the use of CSS custom properties. I had never considered his approach, and I found it interesting enough to write this quick post. Option 1 Take several site components, each with their own link and hover/focus colours. We want to use custom properties for those colours. Exactly how do we do that? Before my discussion with Stefan that wasn’t even a question for me. I would do this: .component1 { --linkcolor: red; --hovercolor: blue; } .component2 { --linkcolor: purple; --hovercolor: cyan; } a { color: var(--linkcolor); } a:hover,a:focus { color: var(--hovercolor) } I set the normal and hover/focus colour as a custom property, and leave the definition of those properties to the component the link appears in. The first and second component each define different colours, which are deployed in the correct syntax. Everything works and all’s well with the world. As far as I can see now this is the default way of using CSS custom properties. I wasn’t even aware that another possibility existed. Option 2 Stefan surprised me by doing almost the complete opposite. He uses only a single variable and changes its value where necessary: .component1 { --componentcolor: red; } .component1 :is(a:hover,a:focus) { --componentcolor: blue; } .component2 { --componentcolor: purple; } .component2 :is(a:hover,a:focus) { --componentcolor: cyan; } a { color: var(--componentcolor) } At first I was confused. Why would you do this? What’s the added value of the custom property? Couldn’t you just have entered the colour values in the component styles without using custom properties at all? Well, yes, you could. But that’s not Stefan’s point. The point In practice, component definitions have way more styles than just colours. There’s a bunch of box-model properties, maybe a display, and possibly text styling instructions. In any case, a lot of lines of CSS. If you use custom properties only for those CSS properties that will change you give future CSS developers a much better and quicker insight in how your component works. If the definition uses a custom property that means the property may change in some circumstances. If it uses a fixed definition you know it’s a constant. Suppose you encounter this component definition in a codebase you just inherited: .component { --color: red; --background: blue --layout: flex; --padding: 1em; --borderWidth: 0.3em; display: var(--layout); color: var(--color); background: var(--background); padding: var(--padding); border: var(--borderWidth) solid black; margin: 10px; border-radius: 2em; grid-template-columns: repeat(3,1fr); flex-wrap: wrap; } Now you essentially found a definition file. Not only do you see the component’s default styles, you also see what might change and what will not. For instance, because the margin and border-radius are hard-coded you know they are never changed. In the case of the border, only the width changes, not the style or the colour. Most other properties can change. The use of display: var(--layout) is particularly revealing. Apparently something somewhere changes the component’s layout from grid to flexbox. Also, if it’s a grid it has three equal columns, while if it’s a flexbox it allows wrapping. This suggests that the flexbox layout is used on narrower screens, switching to a grid layout on wider screens. Where does the flexbox change to a grid? As a newbie to this codebase you don’t know, but you can simply search for --layout: grid and you’ll find it, probably neatly tucked away in a media query somewhere. Maybe there is a basic layout as well, which uses neither flexbox nor grid? Search for --layout: block and you’ll know. Thus, this way of using custom properties is excellently suited for making readable code bases that you can turn over to other CSS developers. They immediately know what changes and what doesn’t. Teaching aid? There’s another potential benefit as well: this way of using custom properties, which are essentially variables, aligns much more with JavaScript’s use of variables. You set an important variable at the start of your code, and change it later on if necessary. This is what you do in JavaScript all the time. Thus this option may be better suited to teaching CSS to JavaScripters, which remains one of my preoccupations due to the upcoming book. Picking an option Which option should you pick? That’s partly a matter of personal preference. Since the second option is still fairly new to me, and I rarely work on large projects, I am still feeling my way around it. Right at this moment I prefer the first way because I’m used to it. But that might change, given some extra time. Still, I think Stefan is on to something. I think that his option is very useful in large codebases that can be inherited by other developers. I think it deserves careful consideration. Full Article CSS for JavaScripters
sto Custom properties and @property By www.quirksmode.org Published On :: Wed, 21 Jul 2021 14:18:40 +0100 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. Full Article CSS for JavaScripters
sto Romancing the stones By www.thehindu.com Published On :: Thu, 10 Aug 2023 21:40:39 +0530 Indian Modernity, a film on architect Raj Rewal’s life, screened in Delhi draws attention to his iconic projects Full Article Delhi