Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
It'd be useful to be able to state what language is in a codebox
Done by adding language as an attribute to pre (the html layout is the same and is backward compatible)
<div class="codebox">
<pre language="CSS">
<code>
.noselect {
user-select: none;
}
</code>
</pre>
</div>
and add this below the pre-existing .codebox stuff.
.codebox pre[language] {
padding-top:10px;
position:relative;
}
.codebox pre[language]:before {
content:attr(language);
position:absolute;
width:calc(100% - 22px);
border-bottom:1px solid #323232;
top:3px;
padding:0px 11px;
padding-bottom:4px;
font-weight:bold;
}
.codebox pre[language] code {
margin-top:10px;
}
-
Edit: for some languages they modify significantly from the language that would otherwise be stated and may help clear things up, so if I say [code=Handlebars][/code] then the title would be "HTML (Handlebars)"; not important
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
This post doesn't have any replies and it's very old, I think it needs a bump.
This is a great idea, I don't see why it hasn't gotten any commotion at all.
Offline
This post doesn't have any replies and it's very old, I think it needs a bump.
This is a great idea, I don't see why it hasn't gotten any commotion at all.
The front end stuff is ready to go.
This would help clarity in some situations.
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
Bump.
Diff, can I get a response please - just 1 word minimum <3
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
is there really a point to purposely using invalid html and unnecessary css to make a glorified semi-automated header?
Offline
is there really a point to purposely using invalid html and unnecessary css to make a glorified semi-automated header?
The HTML is not invalid by any means, which part do you think it is?
I gave the source as the easiest way to implement this, the CSS just needs to be placed in the stylesheet and 1 rule needs to be added to add the language attribute from the BBCode and it all works.
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
I mean like most suggestions if people want it then why not.
"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto
Offline
language isn't a valid attribute on pre, see here on the most recent version or you can read the dtd for the version the forums are actually using here, it isn't in either of them, you can see this quite easily running through w3c's validators (which this site already fails for a number of things, but that really isn't a good reason to add more)
the easiest way to implement this is to literally just type the name above the code box you make
this provides no discernible advantage at all over that, and even just pasting the css and altering the bbcode specifier is too much time wasted to be worth doing this
Offline
language isn't a valid attribute on pre, see here on the most recent version or you can read the dtd for the version the forums are actually using here, it isn't in either of them, you can see this quite easily running through w3c's validators (which this site already fails for a number of things, but that really isn't a good reason to add more)
the easiest way to implement this is to literally just type the name above the code box you make
this provides no discernible advantage at all over that, and even just pasting the css and altering the bbcode specifier is too much time wasted to be worth doing this
Kek, I think I know what I'm saying - you can basically add an attribute called anything, it isn't always future proof but it's not illegal to create your own attributes. One of the main parts of HTML5 is the freedom to do whatever in your HTML and it works.
The advantage of what I suggested is that it's easier for Diff therefore more likely to be added.
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
the fact that a browser will still interpret it to be the way you wish (because browsers constantly bend over backwards to make invalid html work) doesn't mean it isn't invalid, or that it is something that should be done, particular when this website is (supposedly) on strict xhtml. it could be done legally with a data attribute still, but "the freedom to do whatever in your HTML and it works" is absolutely not at all supposed to be a part of html5 (nor does this particular thing rely on the html5 standards)
either way, it doesn't change the fact that this addition is basically useless when you could just do
<html>
</html>
it adds nothing of value and honestly reads more like you trying to show off your cool css tricks than actually adding something useful here
Offline
HTML5 was made so people can have as much freedom with their HTML as they like, it's not bending over backwards - it just accepts everything rather than checks a list published by w3c; it's easier to just say "we have certain actions for these elements but you can make your own and keep your HTML clean and easy to read. Also, HTML never had issues with custom attributes on elements.".
It looks cool and it makes sense to have it.
Why are you so against it? I know what I'm talking about and making a career out of it, it's not bad practice to make your own elements and is necessary to make your own attributes for a lot of things.
I do think it is cool but I also think it's nice to just have an addition to the existing [code].
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
Pages: 1
[ Started around 1738420781.006 - Generated in 0.084 seconds, 12 queries executed - Memory usage: 1.55 MiB (Peak: 1.72 MiB) ]