Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _blank to "location", or create equivalent of JS "open" in ACSS to handle same scenario. #350

Closed
bob2517 opened this issue Feb 8, 2024 · 3 comments
Assignees
Labels
docs to do Documentation still needs doing before this can get released done on branch This issue has been committed to the latest branch, and will get merged with the next release enhancement New feature or request
Milestone

Comments

@bob2517
Copy link
Member

bob2517 commented Feb 8, 2024

As per title. Should be able to get that onto the latest branch at the weekend.

@bob2517 bob2517 added enhancement New feature or request docs to do Documentation still needs doing before this can get released labels Feb 8, 2024
@bob2517 bob2517 added this to the 2.16.0 milestone Feb 8, 2024
@bob2517 bob2517 self-assigned this Feb 8, 2024
@bob2517
Copy link
Member Author

bob2517 commented Feb 8, 2024

Create a new "open" command to align to JS, and allow specifying the target window per the JS rules.

https://developer.mozilla.org/en-US/docs/Web/API/Window/open

Ie. allow things like noreferrer and all those things.

@bob2517 bob2517 added the done on branch This issue has been committed to the latest branch, and will get merged with the next release label Feb 10, 2024
@bob2517
Copy link
Member Author

bob2517 commented Feb 10, 2024

Now on branch, same syntax as JS, with up to 3 strings eg.

button:click {
    open: "https://activecss.org" "_blank" "popup,noreferrer,noopener,width=500,height=500";
}

See MDN link in previous comment for instructions.

Note that doing a straight link in HTML is superior as a general rule, and adding a:not([target="_blank") { prevent-default: true; } (or a:not(.externalLink) { etc.) is best if you need a link without a popup window, as it's the shortest route to cater for every external link on a website.

@bob2517
Copy link
Member Author

bob2517 commented Mar 3, 2024

Closing pending release.

@bob2517 bob2517 closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs to do Documentation still needs doing before this can get released done on branch This issue has been committed to the latest branch, and will get merged with the next release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant