Customize background in Firefox Responsive Design View - firefox

Is there a way to customize the screen background in Firefox "Responsive Design View"?
I would like to insert an image (for instance a blank iphone template) and use screen recording software to simulate a mobile demo.
So far as I could tell there is no way to change the background, either via css or other addons.
I looked at Firefox OS simulator, but it doesn't cover my needs (and you can't use addons like firebug or Agent Spoofer).

Without knowing what you have tried, we have to guess at what you need to answer this question. Do you just need to know what the selectors are? Do you need to be informed as to how to apply the CSS? Are you trying to make an add-on that makes such modifications?
Without more information, here is some general information about the CSS used to style this:
Responsive mode is styled with the CSS in chrome://browser/content/browser.css and chrome://browser/skin/browser.css. Both of these are located within the omni.ja (zip archive with filename extension changed to .ja) file in the browser directory. Within that archive the above files are chrome/browser/content/browser/browser.css, chrome/browser/skin/classic/browser/browser.css, and chrome/browser/skin/classic/aero/browser/browser.css.
The background appears to be a <vbox> and have class="browserContainer" with the attribute: responsivemode="true".
As of Firefox 36.0.4 the relevant CSS is (from chrome://browser/skin/browser.css):
.browserContainer[responsivemode] {
background-color: #222;
padding: 0 20px 20px 20px;
}
There are multiple ways that you could go about making changes to this. One way would be to extract the contents of the omni.ja file, make modifications to the appropriate browser.css file then put all the files back into an archive named omni.ja and put that archive in the browser directory in place of the original file. Another method would be to create an add-on that overrides the chrome://browser/skin/browser.css file (this can be done using the override instruction in the add-on's chrome.manifest file. Yet another method would be for the add-on to directly apply the new style in one of multiple different ways.
However, probably the easiest is to create a [profile directtory]/chrome/userChrome.css file with the CSS you desire to use (you will probably have to create the chrome directory in your profile directory). As an example, the following will result in a red background for the Responsive Design View:
/*
* Edit this file and copy it as userChrome.css into your
* profile-directory/chrome/
*/
/*
* This file can be used to customize the look of Mozilla's user interface
* You should consider using !important on rules which you want to
* override default settings.
*/
/*
* Do not remove the #namespace line -- it's required for correct functioning
*/
/* Set default namespace to XUL */
#namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.browserContainer[responsivemode],
vbox[anonid=browserContainer][responsivemode]{
background-color:red !important;
}

Related

Bootstrap Sass Color change JS

Is it possible to change bootstrap sass colors with a click of a button? I tried googling but I didn't find anything. Thanks for any help <3
No you can't change bootstrap colors with a click of button in whole Sass file because it's not used in browser, It can't be done in CSS file globally if color is directly applied to properties.
But you can modify it if it's a CSS variable, a CSS variable looks like this
--theme-color : blue;
That might be possible if you are using preprocessors in Browser, less.js works in browser but I am not sure if you can change value of variable with a click in less.
I think you should review what you are actually creating.

Eliminating a footer popup in Joomla

Although I'm from WordPress, I need to make a slight change on an old Joomla Website for a friend of mine.
The site is: http://aja-architekten.de
I need to eliminate the footer Popup which says "Wir sind umgezogen".
I know there might be a thousand ways to implement this in Joomla, but what is the plugin or module in the code!
It's difficult to identify without back-end access to the website as it could be a module, a plugin, or even hard coded into the index.php file of the template or similar.
If it's not obvious, the easiest work around might be to add some code to a custom CSS file like this or similar:
#ca_banner {
display: none !important;
}
To create a custom CSS file using a Warp theme, create custom.css in the /css subfolder in the relevant template folder.

Increase code font size in firefox developer tool

How to increase code fonts in Firefox developer tools?
I know that there is a zoom function but I want to set the font size only for the code.
Open Firefox Developer Tools
Click anywhere within Firefox Developer Tools
Press Ctrl++ on Unix/Win or Cmd++ on Mac
To be clear, I mean the + key. You don't need to hold the Shift key while doing it.
Maybe an easier way will be to open about:config and set
devtools.toolbox.zoomValue to bigger value.
You need to modify userChrome.css under ~/.mozilla/firefox/[profile-name]/chrome with this:
/* Styles for Web developer tools */
#namespace url(http://www.w3.org/1999/xhtml);
.CodeMirror {
font-family: "Ubuntu Mono", monospace !important;
font-size: 15pt !important;
}
The result looks like this:
This only changes the debugger and style editor. There's a different selector for the html inspector. Not sure what that is yet.
Open Firefox and type about:support. In Application Basics section chose Profile Folder - Open Folder. It will fire your file manager. If there is no chrome folder than create it. After that go to this chrome folder and create an userChrome.css file, open it in a text editor and add :
.devtools-monospace {font-size: 12px!important;}
Save. Be sure to restart Firefox.
UPDATE: One thing bothered me - while typing in the devtools console the text actually a bit smaller than on output (after pressing Enter). In order to make it the same we need to change font-size for its corresponding css class too. I don't know its class name yet so I just set
* { font-size: 12px !important; } globally and it works.
So sure, as stated before, the short answer is cmd++.
But the + sign might not be directly accessible on your keyboard (no numeric key pad, laptop, strange layout).
You then have to press maj first to access the + sign, like, for example on the american keyboard layout: maj+=.
Unfortunately, even if you are correctly focused on the dev tool pane, cmd+maj+= increases the font of the web view pane, while cmd+- decreases the font on the dev tool pane.
And you end-up with a web tool pane with a font size so small that it is unreadable, and no way to increase it.
Then #Thal's answer comes handy, once focused to the dev tool pane cmd+0 resets the dev tool's font size to the original.
If you want to answer the question like #Timothy_Truckle is asking for, here are a couple of them (still focus on the dev tool pane, of course):
switch to the US keyboard layout and press cmd+=
find a keyboard layout with the + directly accessible, switch to it, and press cmd++
That's for you guys wondering why some find it hard to simply press cmd++ or why some find it hard to focus on the dev tool pane (because they actually focus on the dev tool pane, but the result is as if they were focused on the web view pane).
You can specify a style for the devtools-monospace class selector. To do so, edit userChrome.css in your mozilla profile's chrome directory, and specify the CSS properties you want. For example:
.devtools-monospace {
font-family: "Source Code Pro",monospace !important;
font-size: 16px !important;
}
The userChrome.css needs to be in the chrome folder of your Firefox profile. If the folder don't exist, create it. Your userChrome.css will then override the CSS from Firefox dev tools after you restart the browser.
To find your profile in Windows OS type: Strg + R and then enter:
%APPDATA%\Mozilla\Firefox\Profiles\
Some elements of Firefox can be styled in the userChrome.css file situated in your Firefox profile's chrome folder.
As of 2018, modify/create ~/.mozilla/firefox/[profile-name]/chrome/userChrome.css with something similar to:
#-moz-document url-prefix("chrome://devtools/content/") {
* { font-size: 13px !important; }
}
Then restart Firefox.
The solution on the Mozilla forums almost has it right: https://support.mozilla.org/en-US/questions/1198481
Using Ctrl+= or Cmd+= was not ideal for me since it increased fonts for all the elements of the window, including the tab names.
Using .devtools-monospace { font-size: 13px !important;} was almost ok, but it did not affect the Debugger and Network tabs.
Using #bohag_bihu's solution had side effects for the address bar and some other text inputs.
I accidentally had my firefox developer window resized to the minimum (couldn't even read it anymore), "CMD +" (mac) didn't work for me, well only for the main web page even if the console was focused, I just hit: "CMD 0" and it came back to normal, if it can be a good alternative to anyone else ;)
As John said, the way to increase the font-size in the devtools is to use ctrl/cmd+, just like you would on a web page. In fact the devtools is a webpage. You just need to make sure that the devtools frame is focused first.
I'm afraid there's no way to only increase the font-size for the code right now.
For certain Mozilla versions (I was testing on Mozilla SeaMonkey equivalent to Mozilla Firefox 52 ESR), an explicitly set root element is required.
This will work:
#namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#namespace html url("http://www.w3.org/1999/xhtml");
while this won't:
#namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#namespace html url("http://www.w3.org/1999/xhtml");
Once #namespace rules have been set,
you only need to add selectors and styles:
.devtools-monospace,
.CodeMirror,
.CodeMirror pre {
font-family: "Courier New", monospace !important;
font-size: 10pt !important;
}
This one works on FF => 68.0 Linux with userChrome.css. Inspector tools are now using CSS variables and the inspector tree itself is loaded in an iframe so none of the tweaks actually worked esp. with .CodeMirror classes.
You can find all the variables in this file (just copy paste below URL in FF to view source)
resource://devtools/client/themes/variables.css
For the userChrome.css part here's what solved it for me.
/* #namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); */
:root {
/* Text sizes */
--theme-code-font-size: 13px !important;
}
If userChrome.css is not loaded create userContent.css and add the same rulesets. Tried and tested on FF Mac/Linux 89

#FontFace not working in firefox

So I have this #fontFace rule
#font-face {
font-family: 'myriadPro-Black';
src: url("fonts/myriadPro-BlackCond.otf") format("opentype");
}
It works in Chrome and Safari, but not Firefox. I understand that Firefox has different rules for fontface than other browsers, but I am having a hard time understanding. Getting used to cross browser optimization.
Any ideas on what I'm doing wrong?
Multiple extention's for wider support:
How i generate my fontface rule's is by using a online generator.
It save's a lot of time as it write's everything in the good order.
Plus it make's sure you support a wide variety of different extentions.
An example of such a generator can be found here: http://www.fontsquirrel.com/tools/webfont-generator
Security problem with firefox:
FireFox has secured the #font-face. Firefox for example might throw a 301 error, saying you don't have permission of access to the font file and therefor not load it, while other browsers don't.
You could give the right permissions using .htaccess or whatever config file for the webserver you working on but since i use a variety of webservers this is annoying. What works best for me is placing the font file's in the same directory as the .css file.
So i have one external fonts.css file containing all the css font line's within the font directory. Then i can include this .css file on the page i would like to use this font. Make sure you don't make additional directory's so you can call the font without anny directory. In your example, placing the font file in your css directory and change the code to:
#font-face {
font-family: 'myriadPro-Black';
src: url("myriadPro-BlackCond.otf") format("opentype"); }
more info: https://developer.mozilla.org/en-US/docs/Web/CSS/#font-face

Can I use CSS in directory listing of Firefox?

For example if I put "C:\docs" in address bar of Firefox, it shows all files in the directory. Is it possible to customize this page with CSS?
Apache 2.2 allows us to do it using IndexStyleSheet directive, so I wondered if Firefox can do it.
Firefox has a file userContent.css for each profile (found in the profile's settings folder). That file defines the standard CSS, why may then be overwritten by a website. So they also apply to directory listings.
You should have a look at the actual HTML code Firefox is creating for the directory listing to see how to do the CSS definitions right. You will find extensive documentation about userContent.css on the web.
http://www.mozilla.org/unix/customizing.html#userContent
I think the easiest way is to create an own skin which custom css. You have to modify dirListing.css in this case. (chrome://global/skin/dirListing/dirListing.css)
I know the walnut theme (https://addons.mozilla.org/en-US/firefox/addon/122) includes a modified file listing.

Resources