Home:ALL Converter>Is it possible to use the calc() function to determine fractions with the grid-template-columns property?

Is it possible to use the calc() function to determine fractions with the grid-template-columns property?

Ask Time:2022-12-04T09:52:54         Author:Michael

Json Formatter

I need to calculate the frames for a grid. I wasn't getting the result I thought I should so I dumbed it down to verify it wasn't working. Below is an example of what I'm trying to do.

.classname {
    display: grid;
    grid-template-columns: calc(9 - 1)fr calc(13 - 1)fr;
    /* grid-template-columns: 8fr 12fr; */
}

My goal is to produce the commented line of code with my grid-template-columns calculation. Is this possible?

Author:Michael,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/74672308/is-it-possible-to-use-the-calc-function-to-determine-fractions-with-the-grid-t
yy