Try using the getComputedStyle() function for getting the individual styles of a class.
var SectionArticle = document.querySelector("article.commonclass");
console.log(getComputedStyle(SectionArticle).flex);
Notice here that we are getting the computed style of the element and then calling flex property on it (since that is what you have defined). Now of course if you want just the shrink value of that, you will have to define the style individually or parse out the value from your flex property.
I donβt see why not. As long as they are showing up in the computed styles pane of the browser and the JS is executed at the time the class is being applied to the element.