UI Builder Modal - set CSS to modify modal width

Bernard Esterhu
Tera Expert

I'm trying to set some CSS for a modal component. I would like the modal to have a width of 90% - the default settings are Large and Fullscreen, with nothing in between. The Large is too small and I don't like the Fullscreen.

The component shows this screen when I click "View and edit CSS":

ITSM.NEXT testing 1.png

If I try to edit the External Layer, the changes are discarded. Is this the expected behavior? Should this CSS not be editable?

I'm using Vancouver release.

 

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I don't believe you'll be able to use CSS to set the width. You'll have to use the settings in the properties which limit you to either large or fullscreen. That being said, in Vancouver you can set modals to be resizable and provide minimum and maximum widths and heights to resize to, so that may be something else to explore.

View solution in original post

5 REPLIES 5

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I don't believe you'll be able to use CSS to set the width. You'll have to use the settings in the properties which limit you to either large or fullscreen. That being said, in Vancouver you can set modals to be resizable and provide minimum and maximum widths and heights to resize to, so that may be something else to explore.

@Brad Tilton thanks for the quick response!
I have experimented with the resize options. I though I might use a hack here to set those, and then in some way trigger the resize via script. This would set the modal to the max resize size. But there is no way to trigger the resize automatically.

I think you'll probably just want to go with large and allow the user to resize. You might also open an idea for setting a custom height and width for a modal.

Yes, I think this might be the best. Can you point me to where I can open an idea?