I'm working in a front end for the GSA, but I can't see how to style it.
Can anyone tell me if it is possible to use classes or the styling should be done inline on html tags?
You can either inline the CSS in the XSLT or host it on another webserver and reference it from within the XSLT as you would a normal HTML document.
Assuming you're outputting HTML from your XSLT then once you sort out where to put the CSS you just style it like any other HTML document.
Related
I have a special case where a script tag is placed outside the html tag :
<html>
....
</html>
<script>data</script>
both css and xpath selectors are not finding this script tag, the only way I found is using response.text , but that responds with a giant string and I can not make regex operations on it with selector re() function.
Is there a way to CSS or Xpath tags outside html tag?
I tried with
response.css('script')
But only consider script tags inside html tag
Thanks
Correction :
css selector does not consider tags outside HTML , xpath does.
I used some conditions to filter the tag :
response.xpath('//script[contains(., "function SelectItem()")]')
I just need to embed a small piece of html or xml in the reStructuredText (sphinx) so that the browser can render them in the generated HTML files, like the following little piece
.. raw:: html
testurl
or
.. raw:: html
<math><apply><plus/><ci>a</ci><apply><minus/><ci>b</ci><ci>c</ci></apply></apply></math>
No matter I tried directives like "literal", "raw", "container", "code", either the html code is displayed as the inner text of some "p" block (so the browser display the code rather than render it), or the code just disappear from the output.
What is the correct way to embed html or xml in the reStructuredText (sphinx) so the browser can render them? I just want to html or xml just be placed there intact.
You need to add a blank line between the raw directive and your code.
.. raw:: html
testurl
I would suggest indenting 4 spaces to be consistent with Python formatting, but 2 is fine.
How do I render a strikethrough (or line-through) in an adoc file?
Let's presume I want to write "That technology is -c-r-a-p- not perfect."
That technology is [line-through]#crap# not perfect.
As per Ascii Doc manual, [line-through] is deprecated. You can test here.
Comment from Dan Allen
It's important to understand that line-through is just a CSS role. Therefore, it needs support from the stylesheet in order to appear as though it is working.
If I run the following through Asciidoctor (or Asciidoctor.js):
[.line-through]#strike#
I get:
<span class="line-through">strike</span>
The default stylesheet has a rule for this:
.line-through{text-decoration:line-through}
You would need to do the same.
It is possible to customize the HTML that is generated using custom templates (Asciidoctor.js supports Jade templates). In that case, you'd override the template for inline_quoted, check for the line-through role and produce either an <s> or, preferably, a <del> instead of the span.
If you're only targeting the HTML backend, you can insert HTML code verbatim via a passthrough context. This can be done inline by wrapping the parts in +++:
That technology is +++<del>+++crap+++</del>+++ not perfect.
This won't help you for PDF, DocBook XML, or other output formats, though.
If the output is intended for HTML you can pass HTML.
The <s> HTML element renders text with a strikethrough, or a line
through it. Use the element to represent things that are no longer
relevant or no longer accurate.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s
To render as:
Example text.
use:
1. Pass inline:
Example +++<s>text</s>+++.
2. Pass-through macro:
Example pass:[<s>text</s>].
3. Pass block:
++++
Example <s>text</s>.
++++
I'm working on a SAPUI5 application with XML-Views.
Now I want to arrange my buttons for example. They should be arranged so they form a numberpad like on a keyboard.
I only know the layout managers from Java or the layouts of a SAP Web Dynpro where I also used transparent containers.
So how can I arrange my elements in HTML? How can I use layout managers and is there such a thing as a transparent container?
Thanks for any hints! :)
Arranging HTML elements in SAPUI5 is how you would in normal HTML. SAP does emphasize that code in index.html is to be minimal, however, so do your best to keep your coding done inside of your views. Your elements are likely to be contained in <div>, </div> tags, which, like any other HTML tag, can be manipulated using CSS.
You'll need to create a CSS file and reference it in your index.html file like so:
<link rel="stylesheet" type="text/css" href="css/style.css" />.
Additionally, you should be aware of the native SAPUI5 layout controls and use them when you can as opposed to writing up your own solution.
You might find this post useful as well.
I have an xpath expression that looks like this:
find(:xpath, "//div[#id='drawer-1' and #class='drawer']/h2/a[#class='drawer-toggle']")
I was wondering, is it possible to somehow mix this with css to read something like this?
find("div#drawer-1.drawer/h2/a.drawer-toggle")
Or if this is not possible, is there another way to navigate a DOM with css?
Cheers!
You cannot mix xpath with css. However, in your example, the xpath can be translated to css.
You should be able to do:
find("div#drawer-1.drawer > h2 > a.drawer-toggle")
Note that the "/" are changed to ">". Xpath uses "/" as child selector, where as css uses ">".
A couple useful links:
Child selectors
A cheat sheet that compares xpath with css locators