Skip to content

Instantly share code, notes, and snippets.

Ahmed Abdelaziz Achmed4

  • Egypt
Block or report user

Report or block Achmed4

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View _directional.scss
// directional-scss
$dir: ltr !default;
// Default $dir if not valid
@if $dir != ltr and $dir != rtl {
$dir: ltr;
}
@function if-ltr($if, $else: null) {
@if $dir != rtl {
@Achmed4
Achmed4 / main.js
Created Apr 17, 2019
Firefox issue - Picture tag doesn't work if inside angular app.
View main.js
// Code goes here
function createRenderElement(parentElement, name, attrs) {
var el = document.createElement(name);
// insertion in DOM before applying attributes doesn't work in Firefox
//parentElement.appendChild(el);
for (var i = 0; i < attrs.length; i += 2) {
el.setAttribute(attrs[i], attrs[i + 1]);
@Achmed4
Achmed4 / focus-within.js
Created Apr 8, 2019 — forked from aFarkas/focus-within.js
simple focus-within polyfill
View focus-within.js
(function(window, document){
'use strict';
var slice = [].slice;
var removeClass = function(elem){
elem.classList.remove('focus-within');
};
var update = (function(){
var running, last;
var action = function(){
var element = document.activeElement;
You can’t perform that action at this time.