Is there still currently a character limit on CSS in forms? I am trying to make a rather large form but when I get to a certain point all of my previous CSS reverts back to it's original placement. Is this a character limit or could this possibly be caused by overlapping field rules?
Question
Question
Answer
I see. Well the custom CSS is stored in a database column of type NVARCHAR(MAX), so the character limit would be 2 ^ 31 - 1 bytes, which would correspond to about 1 073 741 822 characters. [Reference]
If your CSS is really taking up over one billion characters then that might be it. Otherwise, you might also check whether the selectors for rules defined later are being superseded by earlier ones.
One way to check if this is the case is to use the DOM explorer (or "inspect element"...the name varies among browsers) in the Developer Tools pane (F12). Mouse over and select the element where you expect a style rule but don't see it manifest. Then scroll through the list of returned CSS rules and see if the one you'd expected appears but is crossed out and disabled. You'd then also be able to see what rule is superseding it.
Replies
There used to a 2000 character limit in forms before version 9.1. As long as you are using a newer version of forms the issue shouldn't be with character limit. I would advise using your browser debuger tools to verify the styles being applied are not being overwritten by other styles.
I can't see any limit other than the fact that the database field used to store the value is of type nvarchar(max). The limitation on that is 2GB, which works out to be something like a billion characters (if you assume 2-byte characters).
I'm not sure about the other parts of your question. What would field rules have to do with the size/placement of your CSS? Can you give more details and possibly post some images or code from your form?
When you say that "all of your previous CSS reverts back to its original placement" do you mean that it seems that changes to the CSS are not being made, or that the actual CSS code which you are typing reverts to not include your changes?
The CSS changes work until I get to the styling much farther in, then the CSS that was previously working until that point, does not work anymore. That's why my assumption was that I may have a hit a character limit. I have found a way to work around it and separate the one very large form into smaller ones for the time being.
I see. Well the custom CSS is stored in a database column of type NVARCHAR(MAX), so the character limit would be 2 ^ 31 - 1 bytes, which would correspond to about 1 073 741 822 characters. [Reference]
If your CSS is really taking up over one billion characters then that might be it. Otherwise, you might also check whether the selectors for rules defined later are being superseded by earlier ones.
One way to check if this is the case is to use the DOM explorer (or "inspect element"...the name varies among browsers) in the Developer Tools pane (F12). Mouse over and select the element where you expect a style rule but don't see it manifest. Then scroll through the list of returned CSS rules and see if the one you'd expected appears but is crossed out and disabled. You'd then also be able to see what rule is superseding it.
I'm sure I haven't gone over that limit then, I will give that a shot. Thank you.