Jump to content

Moving OOC boxes


Neopopulas

Recommended Posts

Okay so i'm going to be annoying and ask about the OOC boxes again. I know there has been some work on them but i have a couple of questions

 

1. I know there might be something in the works, but are we looking at getting a way to close them that doesn't mean you have to click the same button again? Like clicking on an X or just out of the box? I know this one is tricky with mobile stuff.
2. The size of the OOC box is better now that you don't need to have a scroll bar, but it seems to be much bigger than it needs to be most of the time. Is there a way to have it scale to the text in the box - horizontally is mostly my problem - and maybe cap it at a max width so it doesn't overflow the screen? I was checking an OOC of mine and it has maybe two words in it but the box is 90% of the width.
3. This is one i just kinda thought of that i would love. At the moment the OOC box sort of just hovers near the link, but since its harder to make it go away than it was, and also because it could be useful, is it possible to MOVE the box? Like.. click and move it around? Or am i talking crazy? Because now that the OOC box doesn't go away if you click somewhere else like on OGMW, you can have multiple open, the problem is MOST of the time they overlap and make reading them impossible and closing them hard but if you could move them around...

 

Food for thought.

Link to comment
Share on other sites

1. Yes, this is in the works.

2. This is surprisingly difficult, because of issues with the way width is defined in HTML/CSS. If we don't supply a fixed minimum width, the minimum width is defined as "wherever the text can wrap", so the OOC box ends up only as wide as the longest word. There is no way to tell it, "make it as wide as the text would be if it didn't wrap, as long as that's below a defined maximum width", except to write a script to do it. Which may be something we end up doing, but it's lower on the priority list.

3. No, definitely not. This requires a much higher level of interactivity (code), would require different implementations for desktop vs. mobile, and would probably be more annoying than just making it easier to close.

Link to comment
Share on other sites

Is fit-width not working for some reason? Something like

width: fit-width; max-width: whatevs;

should do the job of only making it as wide as it needs to be, then wrapping if it gets too long. All without having to use min-width at all.  Adding block-size: fit-width might also help if there's a height issue. But I can't help much without seeing how you're accomplishing it. It's kind of a mess when you look at a page's source, with things spread out all over the place.

Also, are you guys using an unnecessary amount of !important properties or something? I am having difficulty changing some really basic stuff around, particularly with the OOC fields. For example, you can't change the background color for it. Would just be nice to know so as to avoid more hairpulling. 😄

Edited by Xanathar (see edit history)
Link to comment
Share on other sites

fit-width does not work, because the user agent can fit it in a narrower width and chooses to do so. Between bwatford and myself, we have tried basically every trick in the book to make it work 😄

As far as !important goes, I generally try to avoid it but it probably crept in here and there as we were sorting out precedence of baseline, theme-specific, and plugin-specific CSS files.

 

Link to comment
Share on other sites

To confirm, themes use !important to override set default CSS In cases where something is set for that particular theme.

@Xanathar it is more likely your changed are being overwritten by the html sanitizer if you are trying to change them in a post as some CSS changes are not allowed for security reasons.

I do think the OOC backgrounds are being !important set as that color is theme based. That is due to the need to override the OOC plug-ins default color.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...