The Truth About Cell Styles
“How can I get a table cell to do only what it is told to do? I select a whole row, I apply a cell style that creates a 2 pt stroke on the bottom of the cells. I then select the 5th of 10 columns and apply a cell style to create a vertical stroke on the right hand side of this column. The second applied style made a piece of the horizontal stroke disappear. When I re-apply the 1st cell style, my vertical stroke goes away. Is there away to configure my cell styles to ‘ignore’ the other 3 cell edges and only focus on what I’ve ‘asked’ it to do?”
The short answer is “sadly, no.” To do what’s described you’d have to make a third cell style that applies both the bottom and right strokes, and then use it to style the cells where rows and columns using your other cell styles intersect.
The other thing that would work is to select the row with the bottom stroke style and break the link to the style before applying the right stroke style.
That way, the bottom strokes are overrides, and can be ignored when you apply the new style. This method will probably give you the look you need in the least amount of time, but I hate unstyling stuff. It feels like it’s always going to come back to haunt me down the line.
So why doesn’t it work to just apply one cell style after the other? It comes down to the meaning of “ignore” in the context of cell styles. Every style is based on another style. Every cell style applies a combination of its own attributes and those it inherits from what it was based on (either [None] or another cell style).
So when you create a new cell style that seems to ignore certain attributes, they’ll actually be inherited from the style you’re basing on.
You could argue that the dialog box is a little deceptive. If you select the top and side strokes, it sure looks like they’re being ignored.
But look back at the previous screen shot. It clearly states that this cell style is [None] + a bottom stroke weight of 5 pts. There’s the rub. Manually applied formatting (aka local overrides) are what cell styles can ignore when you apply them. That’s why the Break Link to Style method works here.
So, I have no perfect solution to the dilemma posed in the question, but at least maybe it’s clearer now what’s going on when attributes are ignored in a cell style.