How to support IE8 with breakpoint-sass and mobile first - internet-explorer-8

I am using breakpoint-sass gem to handle media queries for mobile first responsive stylesheets.
I need to create a separate css file for IE8 (which does not support media queries), whereby I want to have all the styles, omitting the strings starting with #media ... { and the other one with closing bracket (because IE ignores everything that is in media query).
I'm using the following setup:
$breakpoint-no-queries: true;
$breakpoint-no-query-fallbacks: true;
The problem is, that to make this working I need each time to pass true into breakpoint() mixin. Is there a better way to achieve my goal? Or probably, is there any way to avoid this repetition and make $no-query: true to be permanent?

Taking a look at the No Query Fallbacks page, specifically the No Query Fallbacks | Separate Fallback File section, you can see that if you have set up your breakpoints using variables, you can add 'no-query' true' to breakpoint definitions, and then you don't need to pass it in to the Breakpoint mixin.
There is no way to tell Breakpoint that you would like all of your media queries to be output in your fallback code as we don't believe that to be a good practice; if your component has three of four breakpoints and only the last one will apply, only that one's code should be served. If you'd like to try to convince us otherwise, please file an issue for a new feature and we can discuss in the issue queue.

Related

Magnolia 5.5.6 Stories App Custom CKEditor Panel

The Magnolia-Team wrote (DevelopingCustomBlocks) that the RichTextFieldDefinition is not available for Blocks.
I would love to use content-editor in the future instead of pages. Is it possible to extent the editor panel
with (custom) plugins for the ckeditor (that I created to use with the RichTextField)? If yes could you give me a hint on how to accomplish that?
It is possible, and you can even use the standard RichTextField.
However before you start extending it, please make sure you understand idea behind new editor, it's working, structure of data it stores and how is that data manipulated later in order to not dig for yourself hole that would be hard to escape with custom extensions.
Whole editor is meant to be fluent for editing and very simple to manipulate offering maximum of freedom. Editor works with concept of blocks. Each hit of enter produces new block of type text. There's other types of blocks offered OOTB by Magnolia. Each different type of block is stored separately and it's rendering can be controlled by template. E.g. each text block becomes paragraph or div in html, depending on your choice. For other blocks, they might produce other types of elements. And this is where you need to become careful. If you extend CK editor, or start using default/old RichTextField, you will suddenly end up with block that already contains html, thus making it unpredictable what the output might look like after such block is processed by your template and whether resulting html is valid or well formatted. The less of html you get "baked in" in each block, the easier templating becomes later.
As for adding extra plugins to the text block, you can modify config.js of the editor, as for adding RichTextField you can just create block that will provide this field. However, keep in mind that with first you run into risk of introducing potentially dangerous html and with the second it's same risk of baking in dangerous html and on top breaking editor experience as RTF will not support same keyboard shortcuts available for other blocks.

Disable PHP autocomplete suggestions in Sublime Text 3

I program php in Laravel and don't use the myriad of native php functions hardly ever. So I don't need the huge list of php functions that are irrelevant to me to pop up all the time as auto-complete suggestions.
I want my own snippets (which are really useful and cool) to appear but nothing else.
Tried in user/preferences "auto_complete": false
All that does is stop the box from showing on the screen, but the suggestions are still present and will be triggered. I want to switch them off completely, except my own snippets.
The potential of custom snippets to generate oft. used code is wonderful. Would like to add more.
But need to remove the above unnnecessaries first so it's not constantly triggering nonsense that just has to be deleted, interrupting flow. How?
You can add delay timer for auto complete with:
"auto_complete_delay": number in miliseconds
So it will delay for auto complete trigger. This way you will hardly see it if you give it something like 2-3 minutes.

How to dynamically create a breakpoint on an expression in chrome?

Say I have some code in production. I want to test that a particular item in a large list of items has some behavior. One way to accomplish this in development with the debugger statement is like this:
items.forEach(function(item){
// some code...
if (item.title.match(/foo/)) {
debugger;
}
// some more code...
});
With that code, you put a breakpoint in a list, only when the list item matches some expression. This makes it easy to debug only that one item, which may have some obscure bug in it. If you just try to put a breakpoint there by clicking the line, then it's going to pause at every item in the list, so you have to step through like 100 items before you get there which is super tedious.
One problem with the above is, it requires you to have the ability to edit the client-side JavaScript, which you can't really do in production.
So the question is, can you accomplish this same sort of thing, but purely using the Chrome Web Inspector? Maybe something to do with "watch expressions" (haven't found much on google about those). The ideal would be, from within the Chrome Web Inspector, add an expression like:
breakpoint:
line: 17
file: build.js
expression: item.title.match(/foo/)
The closest you will get to this without getting into Chrome's chrome.debugger APIs are conditional breakpoints.
If you truly want to do this programmatically, look into chrome.debugger.sendCommand with the Debugger.setBreakpoint command.

Multiple synchronized CKEditor instances on the same page?

I'm working on a document-editing application using CKEditor, where the user can open multiple documents side-by-side in a pair of editor instances.
Most of the time, the user will be editing two different documents, but it's also possible that the two editor instances might contain different views of the same document. That makes things tricky, since I'd like to changes in one editor instance to be immediately reflected in the other instance.
Without hacking the CKEditor core, is something like that possible?
If not, would it be possible to write a plugin that would provide that kind of functionality?
What about if I was willing to get into the core code and hack around a bit? How difficult would it be?
This is a very similar case to a collaborative editing like Google Docs allows. The only differences are that you won't need to synchronize this via network and that it's very unlikely (if not impossible) that the same documents will be modified by two users at the same time. This makes things simpler... a little bit.
A year ago me and my colleague (we are both CKEditor core devs) took part in Node.JS Knockout and our plan was to create a collaborative editor based on CKEditor. It was only 48h, so the result is not impressive, but it worked. The source code is here.
The main problem you'll have is applying changes from editor A to editor B without breaking a caret position in editor B. Basically, you cannot just take data from editor A and set them in editor B, because everything in editor B will be reset including scroll position and caret. Unless this is not a problem, but I assume it is.
So you would need to:
either find a nice algorithm for extracting changes (like diff, but working on a DOM tree, not an HTML string) made in editor A and an algorithm to apply them to editor B (and this is what we implemented on Node.JS Knockout),
or find a way to guess caret position after resetting data in editor B; for example you can remember the caret context in editor B before setting data and try to find it in data that will be loaded.
Both ways are doable, but the first way will give better results if you'll implement it well. However, if your you don't know enough about DOM and contenteditable, then this task may overwhelm you. In this case I would advise to block possibility of opening one document twice.

Oracle Reports 6i - General Layout Properties

Hi I am using Oracle Reports Builder 6i.
I would like to know whether we can control the General Layout properties(Page Break Before, Page Protect, etc...) dynamically at run time?
I need this information for repeating frames.
Thanks
Ram
You can't change these parameters dynamically at run time.
However, what you can do is create multiple "versions" of your layout objects, and write PL/SQL triggers that conditionally show and hide each version.
Depending on what you want to do, there's usually a way to get the layout you need - but it can get tricky sometimes.
For example, if you want a particular frame to sometimes have a Page Break Before, but other times not, you might add an additional frame within it that has Page Break Before set to Yes; and put the condition on that frame. Not sure but this might work for you.

Resources