brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] CSS style hints in style attributes #10218

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by igormakovsky Friday Oct 16, 2015 at 11:58 GMT Originally opened as https://github.com/adobe/brackets/issues/11830


Old Subject: CSS style hints in <style> tags

They just don't appear when writing inline styling. That is kind of unavoidable routine for those working with html emails.

core-ai-bot commented 3 years ago

Comment by redmunds Friday Oct 16, 2015 at 14:56 GMT


@igormakovsky This seems to work for me in a .html file. Start by using Debug > Reload Without Extensions to make sure it's not caused by an extension you installed.

Otherwise, please provide a <style> block example and let us know what's the file extension of your page.

core-ai-bot commented 3 years ago

Comment by igormakovsky Friday Oct 16, 2015 at 18:02 GMT


The example can be dead simple, here it is — file extension is 'html':

<html>
<head>
</head>
<body>
    <p style="margin-top:1em;">Here it is</p>
    </body>
</html>
core-ai-bot commented 3 years ago

Comment by redmunds Friday Oct 16, 2015 at 18:23 GMT


@igormakovsky I see now that you did say "inline styling", but that's a style attribute (not tag). Unfortunately, that is not yet supported.

core-ai-bot commented 3 years ago

Comment by redmunds Friday Oct 16, 2015 at 18:28 GMT


I haven't done any html email authoring in a while, but I think you can define classes in a <style> block and then apply classes to your elements.

core-ai-bot commented 3 years ago

Comment by petetnt Saturday Oct 17, 2015 at 08:42 GMT


Email authoring is still the same pain in the a**, so it's still best to do it like it's 1999 and just to inline all the styles if you want decent client support.

Luckily there are other ways to work around the issue, just as https://github.com/SLaks/Styliner or this inliner tool MailChimp provides: http://templates.mailchimp.com/resources/inline-css/.

Lately I have been writing my email templates with React + inline styles and using [ReactDOMServer.renderToStaticMarkup](https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup) which basically achieves the same goal but with React benefits!

Not really solutions for original issues, just ideas how to make email authoring a bit more reasonable in 2015 :ice_cream:

core-ai-bot commented 3 years ago

Comment by unapieer Wednesday Oct 21, 2015 at 19:45 GMT


Does anyone know of a extension that can do the same thing?

core-ai-bot commented 3 years ago

Comment by redmunds Wednesday Oct 21, 2015 at 22:55 GMT


I'm not aware of any extensions for this. To implement this, the CodeMirror htmlmixed mode will need to be updated to detect style attributes and switch to CSS mode in the value string. Let me know if you're interested in taking this on would like any more info.

core-ai-bot commented 3 years ago

Comment by unapieer Friday Oct 23, 2015 at 03:04 GMT


Thanks for replying. I think I talked with you before on another message about my issue/thoughts. You told me about getting my hand dirty with the code. I did take a crack at it but haven't made much progress with it. Thanks for the help.

core-ai-bot commented 3 years ago

Comment by redmunds Friday Oct 23, 2015 at 15:19 GMT


@unapieer

I did take a crack at it but haven't made much progress with it.

I think this would be great addition to Brackets. Post your code somewhere so we can take a look and try to get it working. This will eventually need to be submitted to CodeMirror and then pulled into Brackets.

core-ai-bot commented 3 years ago

Comment by sprintr Thursday Apr 19, 2018 at 12:55 GMT


@swmitra I believe this issue can be closed now.

core-ai-bot commented 3 years ago

Comment by swmitra Thursday Apr 19, 2018 at 13:12 GMT


Thanks a lot@sprintr for the reminder :+1: . I missed this issue completely while authoring the feature. Will close it by putting the reference of the original PR.

core-ai-bot commented 3 years ago

Comment by swmitra Thursday Apr 19, 2018 at 13:17 GMT


Closing this issue as the requested feature is implemented as part of #13270.