con

IIT Madras partners with SilTerra Malaysia for silicon photonic processor chips

These chips will be utilised for quantum computing and high-speed secured communication systems




con

US’ Memorial Sloan Kettering Cancer Centre builds on India-connect at multiple levels 

“In addition to patient care, MSK has been running successful  educational programmes” - Dr Mrinal Gounder, Sarcoma oncologist, and Early drug development specialist at MSK




con

Short Take: Coal India F&O contract adjustments

On November 5, the stock price and all derivatives contracts on Coal India will be adjusted for dividend appropriately




con

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

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




con

Post mixed Q2, India Inc may face tailwinds in second half of FY25

It needs to be seen if fortunes for the consumer segments will reverse




con

Coming soon, a new asset class to consider

India’s securities regulator is looking to open up a fresh vehicle for investments for people in the mass affluent segment that will be different from existing mutual fund alternatives




con

fit-content and fit-content()

Today we will look at fit-content and fit-content(), which are special values for width and grid definitions. It’s ... complicated — not as a concept, but in its practical application.

min- and max-content

Before looking at fit-content we have to briefly review two other special width values: min-content and max-content. You need those in order to understand fit-content.

Normally (i.e. with width: auto defined or implied) a box will take as much horizontal space as it can. You can change the horizontal space by giving width a specifc value, but you can also order the browser to determine it from the box’s contents. That’s what min-content and max-content do.

Try them below.

min-content and max-content
width: auto: as much as possible
width: max-content
width: min-content
width: max-content with a long text that runs the danger of disappearing right out of the browser window if it continues for much longer
  • min-content means: the minimal width the box needs to contain its contents. In practice this means that browsers see which bit of content is widest and set the width of the box to that value. The widest bit of content is the longest word in a text, or the widest image or video or other asset.
  • max-content means: the width the box needs to contain all of its contents. In the case of text this means that all text is placed on one line and the box becomes as wide as necessary to contain that entire line. In general this is not a desirable effect. The largest bit of content may also be an image or video other asset; in that case browsers use this width to determine the box’s width.

If you use hyphens: auto or something similar, the browser will break the words at the correct hyphenation points before determining the minimal width. (I turned off hyphenation in the examples.)

Quick Chromia/Android rabbit hole

All Chromium-based browsers on Android (tested in Chrome (v90), Samsung Internet (v87), and Edge (v77)) break off the 'width: max-content' text in the example above at the dash, and thus take the 'width: max-' as the max-content, provided the page does NOT have a meta viewport. No other browser does this — and that includes Chrome on Mac.

Also, Chromia on Android make the font-size a tad smaller when you resize the boxes below the maximum possible width. I will ignore both bugs because this article is about fit-content, and not about these rabbit holes.

These bugs do NOT occur in UC (based on Chromium 78). Seems UC is taking its own decisions here, and is impervious to these particular bugs.

fit-content

Now that we understand these values we also understand fit-content. It is essentially a shorthand for the following:

box {
	width: auto;
	min-width: min-content;
	max-width: max-content;
}

Thus the box sizes with its containing box, but to a minimum of min-content and to a maximum of max-content.

fit-content as width, min-width, and max-width
width: fit-content: trying to find my fit
min-width: fit-content
max-width: fit-content

I’m not sure if this effect is useful outside a grid or flexbox context, but it’s here if you need it.

fit-content as min- or max-width

You can also use fit-content as a min-width or max-width value; see the example above. The first means that the width of the box varies between min-content and auto, while the second means it varies between 0 and max-content.

I find this fairly useless and potentially confusing. What you really mean is min-width: min-content or max-width: max-content. If that’s what you mean, say so. Your CSS will be clearer if you do.

So I believe that it would be better not to use fit-content for min-width or max-width; but only for width.

-moz-

Unfortunately, while fit-content works in all other browsers, Firefox still needs a vendor prefix. So the final code becomes:

box {
	width: -moz-fit-content;
	width: fit-content;
}

(These prefixes get harder and harder to defend as time goes by. fit-content has perfectly fine cross-browser support, so I don’t see why Firefox doesn’t just go over to the regular variant.)

fit-content in flexbox and grid: nope

fit-content does not work in flexbox and grid. In the example below the centre box has width: fit-content; it does not work. If it worked the middle box would have a width of max-content; i.e. as small as it needs to be to contain its text.

Flexbox with fit-content
Test content
fit-content
Test content

The final example on this page has a test where you can see grid doesn’t understand this keyword, either.

Note that grid and flex items have min-width: min-content by default, as you can see in the example above.

fit-content()

Let’s go to the more complex part: fit-content(). Although it’s supposed to work for a normal width, it doesn’t.

fit-content and fit-content() as width
width: fit-content: trying to find my fit
width: fit-content(200px)

Grid

You can use fit-content(value) in grid templates, like:

1fr fit-content(200px) 1fr
Grid with fit-content(200px)
Test content
fit-content(200px)
Test content

It means

1fr min(max-content-size, max(min-content, 200px)) 1fr

The max() argument becomes min-content or 200 pixels, whichever is larger. This is then compared to the maximum content size, which is the actual width available due to the constraints of the grid, but with a maximum of max-content. So the real formula is more like this one, where available-size is the available width in the grid:

1fr min(min(max-content,available-size), max(min-content, 200px)) 1fr

Some syntactic notes:

  • We’re talking fit-content() the function here. fit-content the keyword does not work in grid definitions.
  • Here Firefox does not need -moz-. Go figure.
  • fit-content() needs an argument; an empty function does not work. Also, an argument in fr units is invalid.
  • MDN mentions a value fit-content(stretch). It does not work anywhere, and isn’t referred to anywhere else. I assume it comes from an older version of the spec.

I tested most of these things in the following example, where you can also try the bits of syntax that do not work — maybe they’ll start working later.

And that’s fit-content and fit-content() for you. It’s useful in some situations.

Below you can play around with fit-content() in a grid.

Grid with controls

Set grid-template-columns: to

Test content
fit-content() with some more text



  • CSS for JavaScripters

con

Congress leaders project a united stand from Komatireddy’s luncheon meeting

Bus yatra and more interactions with people suggested




con

Rana Daggubati’s Spirit Media to launch ‘Hiranyakashyap’ movie, ‘Minnal Murali’ comic and more at San Diego Comic-Con 2023

Actor-producer Rana Daggubati’s Spirit Media debuts at San Diego Comic-Con 2023 by announcing the mythological film ‘Hiranyakashyap’ and comic based on the superhero film ‘Minnal Murali’ 




con

NIA arrests man from Hyderabad in connection with terror module 




con

India’s first fuel outlet operated by woman convicts inaugurated in Chennai

About 30 woman prisoners will be employed in this petrol outlet in day shift and about 17 men prisoners on the night shift with a salary of ₹6,000 a month




con

Govt to constitute high-level committee to monitor implementation of crop loan waiver, says Harish Rao

CM announced unconditional crop loan waiver twice unlike other States, he said 




con

Decomposed body of woman found at construction site near Hyderabad




con

A spiritual confluence at Varanasi

The Sankara Math at Hanuman Ghat has been a beehive of activities with the presence of the Kanchi Sankaracharya




con

‘Our goal was to bring intelligent conversations to Hyderabad’

Since 2005 Manthan as a platform succeeded in hosting 450 speakers in their monthly events, and about 65 speakers at the annual Samvaad




con

Secondhand Smoke and Cancer

A fact sheet that summarizes the studies on the health effects of exposure to environmental (secondhand) tobacco smoke.




con

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




con

Airports to ensure Digi Yatra registration is voluntary and consensual: Scindia

The Aviation Minister’s comments followed complaints from passengers about forceful collection of personal data at airports




con

Spanish woman gang rape case: Crimes against foreigners in India rarely result in convictions | Data

Approximately, one in twenty rape cases in which victims are foreigners results in convictions




con

Leader of Opposition urges crackdown on criminals to restore public confidence




con

Work on reconstruction of bus terminus apace to ensure operation of buses by month-end

The bus terminus is being reconstructed at a cost of ₹15.75 crore under the Smart Cities Mission. Though the foundation stone was laid in June 2023, the work could not be taken up due to opposition from autorickshaw drivers and traders against the demolition of shops at the bus stand 




con

HRI directed to conduct re-survey of temple lands in Puducherry

According to sources, a report prepared by the Puducherry government in 2017 had revealed that around 200 acres of temple land were under encroachment in the UT




con

AIADMK flays Speaker for flouting parliamentary conventions and rules




con

Scholars discuss transformative role of literature at conference held in Pondicherry University




con

L-G hails contribution of defence forces in maintaining peace in the country




con

Govt to provide 10 essential items at a subsidised rate through CONFED in Puducherry




con

Conclave on Indian Knowledge Systems




con

Electricity Department to disconnect power supply to 22 plastic-manufacturing units




con

Reconstitution of Assembly Assurance Committee stirs row




con

Frequent accidents on a small stretch of main road causes concern

Around 28 motorists were killed in accidents on the 9-km-stretch from Thavalakuppam to Mullodai on Puducherry-Cuddalore Road last year




con

Puducherry Police arrest five in connection with sexual assault of minor girl




con

Congress demands CBI probe into temple land forgery case in Karaikal

After the Kamatchiamman Temple land grabbing case in Puducherry region, the incident of Sri Parvatheeswarar Swamy Devasthanam land forgery case has emerged in Karaikal region, says MP and PCC chief V. Vaithilingam.




con

Watch The Cure Perform a Three-Hour Concert in London, Celebrating the Release of Their New Album

Last Friday, The Cure celebrated the release of their new album, Songs of a Lost World, with a three-hour set at the Troxy in London. The band kicked off the show by performing all eight tracks from the album, before then playing another 23 songs, mostly hits from their large catalog of music. Originally live […]




con

Carl Jung Psychoanalyzes Hitler: “He’s the Unconscious of 78 Million Germans.” “Without the German People He’d Be Nothing” (1938)

Were you to google “Carl Jung and Nazism”—and I’m not suggesting that you do—you would find yourself hip-deep in the charges that Jung was an anti-Semite and a Nazi sympathizer. Many sites condemn or exonerate him; many others celebrate him as a blood and soil Aryan hero. It can be nauseatingly difficult at times to […]




con

High-Performance Photodetector based on ZnO/CsPbBr3 Quantum-dot-level-contact Hybrid Sandwich Structure

J. Mater. Chem. C, 2024, Accepted Manuscript
DOI: 10.1039/D4TC03359K, Paper
Song Wang, Shuhua Yang, Zenglong Xu, Huiyan Xu, Guanbin Duan, Degang Zhao, Xiutong Wang, Bingqiang Cao
Perovskite quantum dot photodetectors have attracted intensive research interest due to their outstanding optical and electronic properties. However, the nonradiative recombination of photo-generated electron-hole pairs on the surface of CsPbBr3...
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Low-pressure hydrogen sensing mechanism based on the field emission of defect-controlled ZnO nanorods

J. Mater. Chem. C, 2024, 12,17419-17428
DOI: 10.1039/D4TC01951B, Paper
Mingliang Dong, Weijin Qian, Youqing Tu, Guitao Chen, Weijun Huang, Haijun Luo, Changkun Dong
The work function of ZnO is reduced with H adsorbed on oxygen defects, leading to the hydrogen sensing effect.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Enhancing visual luminescence detection of tetracycline antibiotics through regulation of nitrogen-containing ligand and antenna effect of Ln3+

J. Mater. Chem. C, 2024, 12,17635-17646
DOI: 10.1039/D4TC02735C, Paper
Tingting Liu, Mengna Ji, Jun Zheng, Nana Liu, Hongguo Hao, Jianmin Dou, Jingjing Jiang, Yunwu Li, Suna Wang
Two water-stable luminescent Cd-MOFs were synthesized from flexible carboxylate ligand and two N-containing ligands with different rigidity and flexibility, which demonstrated different luminescence responses toward antibiotics TC/OTC.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Design of lithium disilicate glass-ceramic based highly thermally stable LuAG:Ce PiG green converter for dynamic laser illumination

J. Mater. Chem. C, 2024, 12,17533-17543
DOI: 10.1039/D4TC03186E, Paper
Yusai Xu, Qianxiong Wen, Xidong Wang, Cong Zhao, Enrou Mei, Meilin Fu, Tengfei Tian, Xiaojuan Liang, Wenxia Gao, Weidong Xiang
In this study, a novel lithium disilicate glass-ceramic was developed as a glass matrix for a highly thermally stable LuAG:Ce PiG green converter, enabling efficient dynamic laser illumination.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Observation and enhancement through alkali metal doping of p-type conductivity in the layered oxyselenides Sr2ZnO2Cu2Se2 and Ba2Zn1−xO2−xCu2Se2

J. Mater. Chem. C, 2024, 12,17574-17586
DOI: 10.1039/D4TC02458C, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Zahida Malik, Sarah Broadley, Sebastian J. C. Herkelrath, Daniel W. Newbrook, Liam Kemp, George Rutt, Zoltán A. Gál, Jack N. Blandy, Joke Hadermann, Daniel W. Davies, Robert D. Smyth, David O. Scanlon, Ruomeng Huang, Simon J. Clarke, Geoffrey Hyett
The optoelectronic properties of two layered copper oxyselenide compounds, with nominal composition Sr2ZnO2Cu2Se2 and Ba2ZnO2Cu2Se2, have been investigated to determine their suitability as p-type conductors.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Spinel CoFe2O4: a room temperature magnetic semiconductor with optical transparency

J. Mater. Chem. C, 2024, 12,17658-17667
DOI: 10.1039/D4TC01607F, Paper
Imran Khan, Jisang Hong
Finding a suitable ferromagnetic transparent semiconducting material is of utmost importance for the development of advanced devices with unique functionalities.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

In situ construction of surface oxygen vacancies on N/TiO2 for promoting visible light photocatalytic H2 evolution

J. Mater. Chem. C, 2024, 12,17500-17510
DOI: 10.1039/D4TC03098B, Paper
Yuandong Shen, Nan Yang, Ke Wang, Bin Xiao, Yijun He, Zhishi Qiu, Tong Zhou, Weijie Zhan, Rui Hu, Genlin Zhang, Jin Zhang, Zhongqi Zhu, Feng Liu, Hao Cui, Qingju Liu
A simple method of mixed sintering of thiourea and NH2-MIL-125(Ti) is adopted to obtain N-doped TiO2 with abundant surface OV, which significantly improves the photocatalytic performance of TiO2 under visible light.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

One-pot and large-scale production of uniform ytterbium-doped perovskite nanocrystals with controllable optical properties

J. Mater. Chem. C, 2024, 12,17647-17657
DOI: 10.1039/D4TC03364G, Paper
Jing Chu, Linxuan Zhang, Quanjie Lv, Yijun Han, Kang Sun, Ke Tao
Monodispersed Yb3+:CsPbCl3 nanocrystals with tunable optical properties were synthesized via a scalable one-pot method. The mechanism of size evolution based on digestive ripening was proposed.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

n-Type redox-tuneable conducting polymer optical nanoantennas

J. Mater. Chem. C, 2024, 12,17469-17474
DOI: 10.1039/D4TC03038A, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Suraya Kazi, Pravallika Bandaru, Haoran Tang, Yulong Duan, Shangzhi Chen, Fei Huang, Magnus P. Jonsson
We show that the n-type conducting polymer PBFDO can be optically metallic for wavelengths above around 695 nm after post-treatment, and that nanostructures of the material can act as optical nanoantennas that are dynamically switchable.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Ultra-low thermal conductivity and enhanced mechanical properties of high-entropy perovskite ceramics

J. Mater. Chem. C, 2024, 12,17687-17694
DOI: 10.1039/D4TC03278K, Paper
Wenjing Qiao, Jiantuo Zhao, Yingwei Qi, Xiaopei Zhu, Xifei Wang, Zhizhi Xu, Mei Bai, Junwen Mei, Yanhua Hu, Xiaojie Lou
A novel entropy-stabilized ceramic system featuring a disordered perovskite structure manifests low thermal conductivity and superior mechanical properties.
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Highly sensitive OFET based room temperature operated gas sensors using a thieno[3,2-b]thiophene extended phthalocyanine semiconductor

J. Mater. Chem. C, 2024, Advance Article
DOI: 10.1039/D4TC03208J, Paper
Recep Isci, Ozgur Yavuz, Sheida Faraji, Dilara Gunturkun, Mehmet Eroglu, Leszek A. Majewski, Ismail Yilmaz, Turan Ozturk
A novel thienothiophene (TT) and phthalocyanine (Pc) based conjugated material was designed, synthesized, fabricated for an organic field effect transistor (OFET) and utilized as an OFET based gas sensor for hazardous gases such as NO2 and SO2.
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




con

Facile Synthesis of Silicon Quantum Dots with Photoluminescence in the Near-Ultraviolet to Violet Region via Wet Oxidation

J. Mater. Chem. C, 2024, Accepted Manuscript
DOI: 10.1039/D4TC02095B, Paper
Yizhou He, Qianxi Hao, Chi Zhang, Qi Wang, Wenxin Zeng, Jiamin Yu, Xue Yang, Shaorong Li, Xiaowei Guo, Serguei Lazarouk
To emit blue photoluminescence (PL), the size of silicon quantum dots (SiQDs) must be reduced to below 1.7 nm, which leads to a considerable increase in synthesis difficulty and cost....
The content of this RSS Feed (c) The Royal Society of Chemistry




con

Hybrid nano-microstructured and bioinspired conductive hydrogels with tunable multifunctionality

J. Mater. Chem. C, 2024, Advance Article
DOI: 10.1039/D4TC04064C, Paper
Manting Wang, Jiaqi Zhang, Yaoyi Guo, Xiaoyong Zhou, Jie-Xin Wang, Yuan Le
A conductive hydrogel with enhanced mechanical properties and excellent multifunctionality is fabricated by facile direct in situ polymerization. This hydrogel can serve as a wearable strain sensor precisely detecting relative resistance changes.
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




con

Recent advances in plasma etching for micro and nano fabrication of silicon-based materials: a review

J. Mater. Chem. C, 2024, Advance Article
DOI: 10.1039/D4TC00612G, Review Article
Chaojiang Li, Yuxin Yang, Rui Qu, Xun Cao, Guodong Liu, Xin Jin, Yuxuan Liu, Shenggui Liu, Wang Jiang, Xianchao Zhang
This review provides the mechanism, simulation, chemistries and processes employed in the plasma etching of silicon-based materials. Current applications and research prospects in plasma etching for micro and nanofabrication are discussed.
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




con

Improving electromagnetic engineering of thermal conductive composites by establishing continuous thermal conductive networks with gradient impedance

J. Mater. Chem. C, 2024, Advance Article
DOI: 10.1039/D4TC03974B, Paper
Dong An, Hongfeng Chen, Huitao Yu, Jiaqi Chen, Junru Yao, Chingping Wong, Wei Feng
Mechanism schematic of the EM wave absorption and thermal conduction of composites.
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




con

Revealing the effect of conductive mechanism on the voltage endurance of ferroelectric thin films via controlling the deposition temperature for reaching high energy storage capability

J. Mater. Chem. C, 2024, Advance Article
DOI: 10.1039/D4TC03879G, Communication
Hongmei Jing, Shibo Zhao, Ting Wang, Wanbiao Hu, Liming Diwu, Jingru Xu, Peiqiao Han, Miao Liu, Zhuo Wang, Zixiong Sun
By controlling the conducting mechanism of BCZT–BZT thin films, which was significantly affected by the deposition temperature, the voltage endurance was strongly enhanced, and the energy storage performance was also optimized.
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