Rotate and sequence trouble

Rotate and sequence are kind of annoying. First, students and friends who play my games find rotate and sequence links confusing. They look exactly like regular links but they act weird, AND it doesn't feel intuitive that, wherever you stop, you've just set an attribut that may have implications later. Second, they can't nest previously selected attributes.

Now here is a useful thing. mrangel's additions to Squiffy allow rotate and sequence to become reusable attributes:

@set myIceCream := {rotate flavor:chocolate:vanilla:muddy sneakers:mint chocolate chip:rum raisin}

Would you like a sample spoon of {myIceCream}?

+++Yes, please.

Alright, here's a taste of our {flavor} ice cream. How about {myIceCream}, next?

So if I'm rubbing the forum lamp, my first wish would be for someone familiar with CSS to tell me how to change the appearance of rotate/sequence links independently from section/passage links. You can't do it with in-editor html.

My second wish would be for mrangel (when they have time, NOT costing themself valuable book-writing or other employment time!!) to force rotate/sequence to nest attributes the way @set random does:

{rotate:something:@attribute:somethingElse}

My third wish is for wealth without toil or scandal to shower upon mrangel, and anyone else who wishes to give me a CSS tip.


Aha!

I've figured out that

a.link-section /****This controls the appearance of section links.****/
{
    text-decoration: none; /***This controls the underline of the links.****/
    color: green;
    cursor: pointer;
}
a.link-passage /****This controls the appearance of passage links.****/
{
    text-decoration: none; /***This controls the underline of the links.****/
    color: purple;
    cursor: pointer;

However I still don't know what names Squiffy's style.template uses for rotate and sequence links.


I have to admit, I've never looked into rotate/sequence/replace because I don't understand why they're needed. From what I've seen, most use cases look like they would be counterintuitive to the player.

So… no guarantees of my mods working effectively around them.


Yeah, I agree that rotate and sequence are the most counterintuitive thing in Squiffy for players/readers. That's why I was looking for the correct CSS to give it a different appearance from section and passage links. Or maybe squiffy should have markdown for a drop-down menu instead?


If you want to style sequence and rotate differently, you could use a[data-sequence] and a[data-rotate] … not sure what version of CSS introduced the [] selector (has an attribute with this name); I remember when it didn't exist, but it's probably 10+ years ago now, so it's probably safe to assume browsers will support it. You could even use a[data-rotate*="wumpus"] to find a rotate sequence in which the not-currently-displayed options contain a given word.


Thanks, mrangel!

This is perfect:

a[data-rotate] /****This controls the appearance of rotate links.****/
{
    text-decoration: none; 
    color: pink;
    cursor: pointer;
}

This behaves weird:

a[data-rotate*="wumpus"] /****This controls the appearance of rotate links containing the word "wumpus".****/
{
    text-decoration: none; 
    color: orange;
    cursor: pointer;

In the example {rotate:wumpus:grue:Ravenous Bugblatter Beast of Traal:sea monster from Seastalker}, the word "wumpus" is pink, and all other options are orange.


Yeah; the attribute has an attribute data-rotate which contains the list of words it will choose from when rotated; it doesn't include the current one. So changing colour based on that will make it pink if it can be wumpus but isn't right now.

You could also replace *= with ^= to colour a link based on its next option, or $= to apply styles based on its previous option.
Not sure if that's useful, but it amused me that you can do that :)


Haha :) I spent a few minutes this morning tinkering with that. Thanks.


Log in to post a reply.

Support

Forums