I installed the script package in Atom to run python scripts. The output is a lot smaller than the editor text, and also I cannot resize the console height. It always takes up the minimum height required, so it changes based on output length which is annoying...
This does not match the "video" on the script home page: https://atom.io/packages/script. How do I get the font size to match the editor font size, and also set a fixed height for the console output?
Atom: 1.27.2 x64,
Script 3.18.1,
Windows: 7 x64 DPI 120%
With regard to small font size, I found a solution here:
https://github.com/rgbkrk/atom-script/issues/1191
That is to locate the script package script.less file and add a font-size property to it under .script-view .line
.script-view {
.panel-body pre {
background: #tool-panel-background-color;
color: #text-color;
}
.output {
}
.stderr {
color: #text-color-error;
}
.line {
border-radius: 0px;
margin: 0px;
padding: 0px;
**font-size: 14px;**
}
}
With regard to not being able to resize the output pane, this issue is also reported here:
https://github.com/rgbkrk/atom-script/issues/1125 and
https://github.com/rgbkrk/atom-script/issues/1637.
It sounds like it may relate to Atom itself and not the script package.
Related
I'm new here and just started learning CSS. This is my first (question)post and maybe the format of my (question)post might not be appropriate.In that case I humbley ask your forgiveness. I'm not very successful in applying/editting css for my site.
I'm trying to center (image)content in the #media only screen and (max-width: 420px)viewport. Searched,found and tried a few solutions for this issue as mentioned in this forum but to no avail. One of the problems is that my wordpress 6.x theme has a load of different style sheets and i have no clue in which order they operate.
This is what i found browsing the style sheets; Beneath each code is the name of the css source file it came from. Can someone please point out which file i should edit and what code i should alter or apply?
If needed i can give access to my site (which is local only atm) or post screenshots!
*source: responsive.min.css :
#media only screen and (max-width:420px){body.boxed:not(.has_general_padding) .wrapper .wrapper_inner,body.boxed.has_general_padding .wrapper .wrapper_inner,body.boxed footer,body.boxed .header_inner,body.boxed .full_width .parallax_content,body.boxed .carousel-inner,body.boxed .content_wrapper{width:320px}.header_bottom,footer .container_inner,nav.content_menu{padding:0 15px}.side_menu .close_side_menu_holder{right:12px}.pp_content{height:250px!important}.pp_hoverContainer{height:200px!important}nav.content_menu .nav_select_menu{border:0}
*source: responsive.css
#media only screen and (max-width: 420px){
body.boxed:not(.has_general_padding) .wrapper .wrapper_inner,
body.boxed.has_general_padding .wrapper .wrapper_inner,
body.boxed footer,
body.boxed .header_inner,
body.boxed .full_width .parallax_content,
body.boxed .carousel-inner,
body.boxed .content_wrapper{
width: 320px;
}
.header_bottom,
footer .container_inner,
nav.content_menu{
padding: 0 15px;
}
.side_menu .close_side_menu_holder{
right: 12px;
}
.pp_content {
height: 250px !important;
}
.pp_hoverContainer{
height: 200px !important;
}
nav.content_menu .nav_select_menu{
border: none;
}
}
The first file (responsive.min.css) is the minified version of the second file (responsive.css), that means that the minified version has no unuseful character like spaces, tabulations...
The minified version of assets like css, js and sometimes directly html page is used to avoid loading unuseful character and to make download faster. So your theme is probably using the minified version.
I really suggest you edit responsive.css and then, thanks to lots of tools you find on the Internet, create the minified version and replace the existing one.
To center the content you have 2 ways:
Setting a fixed width for your content and then setting a margin: auto; property;
Setting the container of your content to display:flex and then setting your content to justify-content: center;
You can check if certain input fields are not filled using the isset() function in PHP: For example:
if (isset($_POST['sku']) {
//exists
}
While to check if the product already exists you have to check if it exists in database so you must necessarily make a query.
Does anybody know how to force mdbook to use the whole content area? Currently there is a large margin left and right and the whole content (especially tables) are heavily compressed.
See https://github.com/rust-lang/mdBook/issues/1847
Full quote from the link:
There isn't a specific setting for the width. Something like this should work:
:root {
--content-max-width: 500px;
}
There are several css files and such that you can override. https://rust-lang.github.io/mdBook/format/theme/index.html discusses the files, and mdbook init --theme will give you a copy of the defaults.
The answer of sarema points exact to the correct solution, but there is still one detail which is important. So, for everyone else who is interessted in this problem, here the full solution:
In the main book.toml file you can specify a custom .css file:
[output.html]
additional-css = ["custom.css"]
In this custom.css file you can override all available css classes as sarema already has posted:
:root {
--content-max-width: 500px;
}
When you take a look to the page source within your web browser, you can examine all the available css classes. https://rust-lang.github.io/mdBook/format/theme/index.html gives an overview about the main .css files, but in order to get the details there is no other solution than to examine this files by hand. So in my case I have additionally changed some margins of .css classes I found in the page sources like this:
:root {
--content-max-width: 80%;
}
.chapter li.part-title {
color: var(--sidebar-fg);
margin-bottom: -5px;
margin-top: 11px;
font-weight: bold;
}
.chapter li.chapter-item {
line-height: 1.5em;
margin-left: 0.5em;
margin-top: 0.6em;
}
Hope, this description is helpful for some others who despair of the styling of their mdbook ;)
I am using antora for documenting a product architecture specification. We have large diagrams so allowing the svg images to scale up as large as possible when maximizing the browser window is a big plus.
I am not even a css novice. I know almost nothing. I can build antora documents (web pages) so I know only a tiny bit of antora from a user perspective.
I found this comment on how to make the scaling work. https://gitter.im/antora/users?at=5d97c8ea37073b36a06fddb8
I can get the desired results if I edit doc.css, build a ui-bundle.zip, point local-antora-playbook.yml at the newly created ui-bundle.zip and rebuild the site.
.doc {
color: var(--doc-font-color);
font-size: var(--doc-font-size);
hyphens: auto;
line-height: var(--doc-line-height);
margin: var(--doc-margin);
/* max-width: var(--doc-max-width); */
padding: 0 1rem 4rem;
}
#media screen and (min-width: 1024px) {
.doc {
flex: auto;
font-size: var(--doc-font-size--desktop);
margin: var(--doc-margin--desktop);
/* max-width: var(--doc-max-width--desktop); */
min-width: 0;
}
}
This is the suggested edit in the comment link I found and posted just above. I would prefer to use the supplemental-ui approach that is referenced here; Antora top navigation bar customization and actually used by the documentation for antora https://gitlab.com/antora/docs.antora.org.
I can see that my edited doc.css gets created in the new site when I build via a supplemental-ui approach. However, I don't get the desired results of being able to use the max-width of the web browser when maximized. I understand that in css if you declare something later it takes precedence. I'm wondering if the absence of a max-width is simply not being observed because of the order of sourcing files. I've tried different file names like doc.css and xdoc.css thinking they were sourced alphabetically. This didn't seem to help.
Is there a way to make this small css change and use the supplemental-ui approach of getting it into my antora site when I build it?
I would like the supplemental-ui approach to work so we can always stay up to date with antora changes and only have our tiny change to max-width. The approach I have working requires building antora with the tiny change and pointing at that new zip file to build antora instead of sourcing the current latest antora in the public antora repo.
For debug I also tried this approach with the supplemental-ui build procedure. I understand !important is not recommended but I was just trying to figure out if I could get something working other than the full build to a zip file.
.doc {
color: var(--doc-font-color);
font-size: var(--doc-font-size);
hyphens: auto;
line-height: var(--doc-line-height);
margin: var(--doc-margin);
/* max-width: var(--doc-max-width); */
max-width: none !important;
padding: 0 1rem 4rem;
}
#media screen and (min-width: 1024px) {
.doc {
flex: auto;
font-size: var(--doc-font-size--desktop);
margin: var(--doc-margin--desktop);
/* max-width: var(--doc-max-width--desktop); */
max-width: none !important;
min-width: 0;
}
}
It's possible to alter the effective css using supplemental UI but is slightly less performant (requiring fetching an additional css file) and I don't recommend it. The process of building a UI bundle puts all the css into one optimized file, which cannot really be modified later using supplemental UI. Therefore what you have to do is add a "new" css file in your supplemental UI containing the modifications or overrides you want, and also include a partial that pulls in your additional file.
For instance, if your additional file is css/expand-svg.css, you'd need also a partials/head-styles.hbs containing
<link rel="stylesheet" href="{{uiRootPath}}/css/site.css">
<link rel="stylesheet" href="{{uiRootPath}}/css/expand-svg.css">
I tried this with the additional css file containing
.doc {
max-width: none;
}
#media screen and (min-width: 1024px) {
.doc {
max-width: none;
}
}
and it appears to work as you want. The !important isn't needed as the additional css appears later than the default UI css so overrides it.
When printing to PDF in Google Chrome ("Save to PDF" virtual printer), there's an option to set margins for every page in inches // cm. However, by default they are always white. Is there a way to change color to blue, or use background-image?
What I've tried:
Ensured all background graphics are printed:
#media print and (color) {
* {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
Tried to set bg-color for #page attribute:
#page {
size: 7in 10in;
margin: 1in;
}
Tried to set bg color for every element on page: html, body, #content .
This article shows an example, how to affect margins areas with footnotes:
#page:right{
#bottom-left {
margin: 10pt 0 30pt 0;
border-top: .25pt solid #666;
content: "My book";
font-size: 9pt;
color: #333;
}
}
But it doesn't work for me.
Also I've tried to inspect chrome build-in PDF previewer and found a string:
<embed id="plugin" type="application/x-google-chrome-pdf" src="chrome://print/190/0/print.pdf" stream-url="chrome://print/190/0/print.pdf" headers="" background-color="0xFF525659" top-toolbar-height="0" top-level-url="undefined">
However, it's a bit tricky to modify background-color though it's already loaded and rendered. And I'm not sure, if it affects resulted PDF or just preview:
Any other options? This feature is rather critical for me, so I'm ready for memory hotpatching or even rebuilding Chromium from source if needed at least.
Target platform: Win 10 x64
There exist no direct way, but you can fake it:
Goto Format > Page.
Set the margin to 0cm. Ignore printer warning.
Set the background to your favorite color in tab Area.
Goto tab Borders and define a border in the same color. On that tab use the setting "Spacing to Contents" to fake the margins.
The default size of the input text field in my installation of Jupyter Notebook has doubled. I am not sure how it happened or how to get it back to the normal size. How can one reset the defaults ?
For Jupyter notebook server is 4.2.1
Update ~/.jupyter/custom/custom.css to add the following text:
/* Make the notebook cells take almost all available width */
.container {
width: 99% !important;
}
/* Prevent the edit cell highlight box from getting clipped;
* important so that it also works when cell is in edit mode*/
div.cell.selected {
border-left-width: 1px !important;
}