I'm attempting to set the text highlight colors in my project that uses TailwindCSS. This can be done fairly easily using the "selection" modifier that Tailwind provides. This works fine except when I try to set different colors for dark mode. I can't figure out what I'm doing wrong but I can't find anything online regarding how to correctly use the "dark" and "selection" modifiers in conjunction.
I tried the following syntax in attempt to get it to work correctly:
<html className="selection:bg-blue selection:text-purple dark:selection:bg-pink dark:selection:text-blue">
However, this only picks up the selection:bg-blue selection:text-purple styles and not the dark mode selection styles (dark:selection:bg-pink dark:selection:text-blue) when dark mode is activated.
Any thoughts on what I'm doing wrong? Thanks in advance.
Edit:
The colors do exist in my tailwind config:
I figured this out. I wasn't thinking and realized what I was doing wrong was putting the selection classes on the HTML tag. The HTML tag is where the dark mode class gets applied and due to this, the selection class wasn't a descendant of the .dark mode class. To fix it, I moved the selection classes to the body tag.
in the picture next to column.isSortedDesc , "Down" and "up" arrows are typed in code itself in vscode editor how can we add icons like this in code it self
Those are not icons but plain emojies, vscode has support for UNICODE emoji characters by default, you could just copy and paste emojies into code just like you do with text. Here is a full list of emojies for reference that you could use in your code: https://unicode.org/emoji/charts/full-emoji-list.html
In the WebStorm 2016.1 release notes they have this image.
See here
But when I try to type this mine looks like this
Do I have to manually enter the tabs to make this happen? Shouldn't it auto format? If so, how do I set up auto formatting?
You can use the Angular2HTML Fragment editor. With your cursor positioned inside your inline template, you should see an orange exclamation popup. In this should be an option to "Edit Angular2HTML Fragment".
I'm using the latest version of WebStorm 2016.1
I have a problem with the Omega Theme's styling. I'm actually trying to do something very basic: To make the paragraph margin smaller. Normally I'd put stuff like that into sites/all/themes/my_omega_subtheme/css/global.css and it would work, but in this case it didn't.
So I debugged the webpage and it seems Omega puts some temporary CSS files into sites/default/files/css that are overriding global.css. So I guessed I would be able to change this in the appearance settings, but there aren't any settings for the paragraph margin. Of course I can't change the margin in there, either, because the files seem to be generated every now and then (at least the names are different today, and I made sure to not click save in the appearance settings).
Additionally I tried setting it with CSS ID and / or class because I thought this would surely override the temporary CSS file's value of p { margin-bottom: 20px; }, but it seems I'm just not informed properly.
So what is the correct way to set the paragraph margin in an Omega theme?
Normally the CSS files stored in sites/default/files/css are the compressed CSS files which drupal generates automatically. To be able to make any changes appear as normal, you need to disable CSS compression.
Go to ?q=admin/config/development/performance and un-check the option Aggregate and compress CSS files.
Now when you view the page source, you should be able to see a list off your theme's CSS files.
How can i Enable the Text Color plugin of Tinymce in Toolbar of Visual Editor ?
I was able to enable the print, search and replace plugins inside the Visual Editor by editing this file
Composite/content/misc/editors/visualeditor/includes/toolbarsimple.inc
and
modifying a line in below file to include the searchreplace, print plugins
Composite/content/misc/editors/visualeditor/visualeditor.js
plugins: "compositelink,compositetable,compositeimage,compositerendering,compositecharmap,compositefield,compositetext,paste,lists,searchreplace,print",
Similarly is there any way to enable the inbuild feature of Tinymce namely Text Color, Font Size, Font Family, Table, Row, Column in the toolbar of the Visual Editor without making the changes through styles which is done by editing this file
Frontend/Config/VisualEditor/common.xml
Thanks
Ajith
Managed to get the Text Color, Background Color, Font Family, Font Size up and running inside the Composite C1 editor.
Listing down the steps below for the benefit of others.
Copy all the files and folder from Website\Composite\content\misc\editors\visualeditor\tiny_mce\themes\advanced except editor_template.js and editor_template_src.js into your Website\Composite\content\misc\editors\visualeditor\tiny_mce\themes\composite folder.
Edit the file Website\Composite\content\misc\editors\visualeditor\visualeditor.js and include the below lines in the config section.
skin: 'default',
theme_advanced_buttons1: "forecolor,backcolor,fontselect,fontsizeselect",
theme_advanced_buttons2: "",
For a complete list of options visit the TinyMCE link and go to View Source.
You might also want to inclue inlinepopups in the plugins: line for proper rendering of the popups. Any additional plugins like insertdatetime, media, print,searchreplace, etc can also be included in the same line.
To include the plugins like insertdatetime, media, print, searchreplace in existing toolbar row, edit the Website\Composite\content\misc\editors\visualeditor\includes\toolbarsimple.inc file and include the respective tags containing the commands. For eg.
<ui:toolbargroup>
<ui:toolbarbutton cmd="mceSearch" tooltip="Search" image="${skin}/wysiwygeditor/search.png" isdisabled="false" />
<ui:toolbarbutton cmd="mceReplace" tooltip="Replace" image="${skin}/wysiwygeditor/replace.png" isdisabled="false" />
</ui:toolbargroup>
Copy and merge the code from the Website\Composite\content\misc\editors\visualeditor\tiny_mce\themes\advanced\editor_template_src.js file into the Website\Composite\content\misc\editors\visualeditor\tiny_mce\themes\composite\editor_template.js file. Most of the functions can be copied over as it is. Only the common ones like renderUI need special attention. I directly gave a call to the simpleLayout function instead of using a switch in the renderUI
ic = t._simpleLayout(s, tb, o, p);
There could be some issue with not being able to see the entire content in the editor for large content, to fix this issue edit the Website\Composite\content\misc\editors\visualeditor\tiny_mce\themes\composite\skins\default\ui.css file and modify the .defaultSkin iframe css to specify proper height or overflow scroll.
To include more features to your toolbar, just edit theme_advanced_buttons1.
Good Luck..
Ajith
With Composite C1 you need to do styling (like font face, font size, colors and table related styles) using CSS classes and make these classes available to end-users.
The front-end developer define classes needed in CSS and then register them in the toolbar configuration file from where the end-user can select the styles. Composite C1 does not promote having font tags or style attributes in the content html, so if that is what you really want you need to make changes to the core javascript.
You can read about customizing the Visual Editor toolbar here http://docs.composite.net/Console/CustomizingVisualEditor.